SelinD

ex98

Apr 9th, 2019
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. int n,m,ok=1;
  6. cin>>n;
  7. m=n%100;
  8. n=n/100;
  9. while(n>9)
  10. {
  11. if(n%100!=m)
  12. ok=0;
  13. n=n/100;
  14.  
  15. }
  16. if(n!=m%10) ok=0;
  17. if(ok!=0) cout<<"da";
  18. else cout<<"nu";
  19. }
Add Comment
Please, Sign In to add comment