Advertisement
dllbridge

Untitled

Nov 6th, 2022
887
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. string a, b;
  5. int       c;
  6.  
  7. /////////////////////////////////
  8. int main()                    //
  9. {
  10.     cin >> a >> b;
  11.    
  12.     for(int i = 0; i < a.size(); i++)
  13.     for(int y = 0; y < b.size(); y++)  if(a[i] == b[y]) c++;
  14.        
  15.     cout << c;  
  16. }
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement