Advertisement
Guest User

Untitled

a guest
Sep 18th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int n1, n2, i=0;
  8.     cin>>n1>>n2;
  9.     while((n1!=0) && (n2!=0))
  10.     {
  11.         if(n1%10==n2%10) i++;
  12.         n1=n1/10;
  13.         n2=n2/10;
  14.     }
  15.     if((n1==0) && (n2==0))
  16.     {
  17.         cout<<"DA"<<endl;
  18.         cout<<i;
  19.     }
  20.     else cout<<"NU";
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement