Advertisement
dllbridge

Untitled

Nov 24th, 2022
707
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.     string a, b, c;
  7.    
  8.     cin >> a >> b;
  9.    
  10.     for(int i = 0; i < a.size(); i++)
  11.     {
  12.         if(a[i] == b[i]) c[i] = '0';
  13.         else             c[i] = '1';
  14.     }
  15.    
  16.     for(int i = 0; i < a.size(); i++) cout << c[i];
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement