What's the code? What's the code?

If I input elements I should get the Relative Complement of Set A from Set B. The problem is I don't know the code for Relative Complement. Here's what I've done:

char A[50];
char B[50];
int e;
int i;
int j;


cout<<"Enter number of Elements to input: ";
cin>>e;
cout<<endl;

for(i=0;i<e;i++)
{
cout<<"Enter element "<<i+1<<" of your Set A: ";
cin>>A[i];
}
cout<<"Set A = { ";
for(i=0;i<e;i++)
{
cout<<A[i];
if(i<e-1)
{
cout<<" , ";
}
}
cout<<" }";
cout<<"\n\n";


for(i=0;i<e;i++)
{
cout<<"Enter element "<<i+1<<" of your Set B: ";
cin>>B[i];
}
cout<<"Set B = { ";
for(i=0;i<e;i++)
{
cout<<B[i];
if(i<e-1)
{
cout<<" , ";
}
}
cout<<" }";
cout<<"\n\n";

P.S It should be in For Loop. Thanks ;)
Last edited on
Topic archived. No new replies allowed.