SHARE
TWEET

Untitled

a guest Sep 18th, 2019 93 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top