Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int n1, n2, i=0;
- cin>>n1>>n2;
- while((n1!=0) && (n2!=0))
- {
- if(n1%10==n2%10) i++;
- n1=n1/10;
- n2=n2/10;
- }
- if((n1==0) && (n2==0))
- {
- cout<<"DA"<<endl;
- cout<<i;
- }
- else cout<<"NU";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement