Example: If set A = {1,2,3,4} and B {6,7} Then, Union of sets, A ∪ B = {1,2,3,4,6,7}
#include
int main()
{
int a[10], b[10], c[10], i, j, k = 0, n1, n2;
// Creating first set, Set A
printf("Enter the size of set A\n");
scanf("%d", &n1);
printf("Enter the elements of set A\n");
for (i = 0; i < n1; i++)
{
scanf("%d", &a[i]);
}
// Creating second set, Set B
printf("Enter the size of set B\n");
scanf("%d", &n2);
printf("Enter the elements of set B\n");
for (i = 0; i < n2; i++)
{
scanf("%d", &b[i]);
}
// printing set A
printf("\n set A is :-\n");
for(i=0; i
When the above program is executed, it produces the following result −
1 Comments
I didn't think that blogspot pe v itni achhi website ban skti h......your content is really awesome ...just recommend to give litte bit discription about code........hope your PV increase
ReplyDelete