This is the code ive got so far
#include <iostream>
int main()
{
int a[10] = {0}; //sets an array of ten zeros
int x; //intialises x
int y; //intialises y
std::cin>> x; //reads in x input
std::cin>> y; //reads in y input
if ( -1 < x && x < 10 ) //intialises from zero to 10
a[x] = 1; //puts input of x to 1
a[y] = 1; //puts input of y to 1
for ( int i = 0; i < 10; i++ ) //does a loop of zero's
std::cout<< a[i] <<' '; //put inputs a[x] a[y] into loop
std::cout<<'\n';
int b[10] = {0};
int x1;
std::cin>> x1; //reads in x1 input
if ( -1 < x && x < 10 ) //intialises from zero to 10
b[x1] = 1;
for ( int p = 0; p< 10; p++ ) //does a loop of zero's
std::cout<<b[p] <<' ';
std::cout<<'\n';
return 0 ;
}
it output two lines of code eg
00010101
01000000
i want to be able to create a third set that intersects the two previous sets and displays the output.
01010101
Thanks.