Discrete structures and Logic Lab(KCS-353)
Experiment No. 03
AIM : To find the difference between the two sets.
DESCRIPTION :
Bor vice versa. Difference is A-B or B-A.
A= {1,2,3} B= {2,3,4} A-B= {1} BeA=
CODE:
#include
int main()
{
DIVAKAR
int s1[100},s2{100),s3{100],n1,n2,i,ch,.k.e;
printf{"Enter size of Ist set ");
seanf("%d",&n1);
print{("Enter the Ist set \n");
for(iO;icnl i+)
seanf"%d",&s[i]);
printft"Enter size of 2nd set
scanf{"%d",&n2);
printf{"Enter the 2nd set \n");
for(i=0;i");
seanf{"%d",&ch);
switeh(ch)
{
case 1:
k-0;
while(i 1
(sl-s2)is 6 5 1
Enter size of Ist set 6
Enter the Ist set 79.4651
Enter size of 2nd set 4
Enter the 2nd set 4978
Enter 1 for (1-2) or 2 for (s2-s1) > 2
(s2-sl)is 8
DIVAKAR 2100910130045
IT1 AQ)