#include <iostream>
using namespace std;
int main()
{
int num1, num2,iand,ior,ixor;
num1 = 1;
num2 = 2;
iand = num1 & num2;
ior = num1 | num2;
ixor = num1 ^ num2;
cout << num1 << " AND " << num2 << " is " << iand << endl;
cout << num1 << " OR " << num2 << " is " << ior << endl;
cout << num1 << " XOR " << num2 << " is " << ixor << endl;
return 0;
}
|