Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- string a, b, c;
- int main()
- {
- cin >> a >> b;
- for(long long i = 0; i < a.size(); i++)
- {
- if(a[i] == '0' && b[i] == '1') c[i] = '1';
- if(a[i] == '1' && b[i] == '0') c[i] = '1';
- if(a[i] == '0' && b[i] == '0') c[i] = '0';
- if(a[i] == '1' && b[i] == '1') c[i] = '0';
- }
- for(long long i = 0; i < a.size(); i++)cout<<c[i];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement