#include<stdio.h>
#include<conio.h>
void Union(int set1[10],int set2[10],int m,int n);
void Intersection(int set1[10],int set2[10],int m,int n);
void main()
{
{
int a[10],b[10],m,n,i,j;
int ch;
clrscr();
printf("\nEnter the no of elements in first set:");
scanf("%d",&m);
printf("\nEnter the elements:");
for(i=0;i<m;i++)
{
scanf("%d",&a[i]);
}
printf("\nElement of First set:\n");
for(i=0;i<m;i++)
{
printf("\t%d",a[i]);
}
printf("\nEnter the no of elements in second set:");
scanf("%d",&n);
printf("\nEnter the elements:");
for(i=0;i<n;i++)
{
scanf("%d",&b[i]);
}
printf("\nElement of second set\n");
for(i=0;i<n;i++)
{
printf("\t%d",b[i]);
}
while(1)
{
printf("\n\tMenu\n\n1.Union\n2.Intersection");
printf("\n3.exit");
printf("\nenter your choice:-");
scanf("%d",&ch);
switch(ch)
case 1:
union(a,b,m,n);
break;
case 2:
intersection(a,b,m,n);
break;
case 3:
exit(0);
}
getch();
}
}
void union(int a[10],int b[10],int m,int n)
{
int c[20],i,j,k=0,flag=0;
for(i=0;i<m;i++)
{
c[k]=a[i];
k++;
}
for(i=0;i<n;i++)
{
flag=0;
for(j=0;j<m;j++)
{
if(b[i]==c[j])
{
flag=1;
break;
}
}
if(flag==0)
{
c[k]=b[i];
k++;
}
}
printf("\nElement of resultant set\n");
for(i=0;i<k;i++)
{
printf("\t%d",c[i]);
}
}
void intersection(int a[10],int b[10],int m,int n)
{
int c[20],i,j,k=0,flag=0;
for(i=0;i<m;i++)
{
flag=0;
for(j=0;j<n;j++)
{
if(a[i]==b[j])
{
flag=1;
break;
}
}
if(flag==1)
{
c[k]=a[i];
k++;
}
}
printf("\nElement of resultant set\n");
for(i=0;i<k;i++)
{
printf("\t%d",c[i]);
}
}
#include<stdio.h>
you can use strstr()
write a c program to display marks,total,average,grade using union
you can find a sample paper with the brochur. That was the oly guide line we had.
Write an. Algorthim. To. Find the. Sum. Of. First15 natural. Numbers
#include<stdio.h>
you can use strstr()
You can find the intersection of the angle bisectors or the intersection of the perpendicular bisectors of each side.
It would help to know "... the point of intersection of a parallelogram" and what!
write a c program to display marks,total,average,grade using union
You could use an if, but the ternary operator is especially compact for this purpose: result = a > b ? a : b;
The reason we use max for union is because the union of two sets should include all elements from both sets, so the max operation ensures that the larger of the two elements is included. Conversely, we use min for intersection because we want to find the common elements shared by both sets, so the min operation ensures we only include elements that are in both sets.
another point
www.graffiticreator.net/
if you think that you have uninstall a programme but it is still there in your computer you need check in the programme files where you will see the list of programme .....
Unless the line is a subset of the plane, the intersection is a point.
it is the intersection of the medians of two cords!