Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main()
- {
- int n,m,ok=1;
- cin>>n;
- m=n%100;
- n=n/100;
- while(n>9)
- {
- if(n%100!=m)
- ok=0;
- n=n/100;
- }
- if(n!=m%10) ok=0;
- if(ok!=0) cout<<"da";
- else cout<<"nu";
- }
Add Comment
Please, Sign In to add comment