Skip to main content

Posts

Showing posts from 2019

programs

#include<stdio.h> #include<conio.h> void main() { int i,k=0,x[10],y[10],c[25],j,n,n1,d[25],f=0; clrscr(); printf("\n how many elements in SET 1:"); scanf("%d",&n); printf("\n please enter the elements" ); for(i=0;i<n;i++) { scanf("%d",&x[i]); } printf("\n how many elements in set 2:"); scanf("%d",&n1); printf("\n please enter elements"); for(i=0;i<n1;i++) { scanf("%d",&y[i]); } for(i=0;i<n;i++) { c[k]=x[i]; k++; } for(i=0;i<n;i++) { for(j=0;j<n1;j++) { if(y[i]==x[j]) break; } if(j==n) { c[k]=y[i]; k++; } } printf("\n the union set is:"); for(i=0;i<k;i++) printf("%d  ",c[i]); for(j=0;j<n;j++) { for(i=0;i<n1;i++) { if(y[i]==x[j]) break; } ...

gym management using c

                                                                      gym management /* THIS PROJECT IS BROUGHT TO YOU BY CODE-PROJECTS. FOR MORE FREE PROJECTS LOG ON TO www.code-projects.org   */ #include<windows.h> #include<stdio.h> #include<conio.h> #include <stdlib.h> #include<string.h>                #include<ctype.h>                  #include<dos.h>                  #include<time.h> #define RETURNTIME 15 char catagories[][15]={"New Member","Coach","Staff"}; void returnfunc(void); void mainmenu(void); void addstaff(void); void deletestaff(void); void editstaff(void); void searchstaf...

0

Ada [ edit ] Ada has the lattice operation  xor  predefined on Boolean, modular types, 1D arrays, set implementations from the standard library. The provided solution uses arrays: with Ada. Text_IO ; use Ada. Text_IO ;   procedure Test_XOR is type Person is ( John, Bob, Mary, Serena, Jim ) ; type Group is array ( Person ) of Boolean; procedure Put ( Set : Group ) is First : Boolean := True; begin for I in Set' Range loop if Set ( I ) then if First then First := False; else Put ( ',' ) ; end if ; Put ( Person'Image ( I ) ) ; end if ; end loop ; end Put;   A : Group := ( John | Bob | Mary | Serena => True, others => False ) ; B : Group := ( Jim | Mary | John | Bob => True, others => False ) ; begin Put ( "A xor B = " ) ; Put ( A xor B ) ;...