Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<bitset>
- using namespace std;
- int main()
- {
- bitset<3> a;
- int x[] = {2,3,4};
- int y[] = {2,3,2};
- int res =0;
- int total =0;
- for(int i =0; i<3;i++)
- {
- a[i] = x[i] & y[i];
- cout << a << endl;
- }
- cout <<a.count();
- }
Advertisement
Add Comment
Please, Sign In to add comment