Advertisement
STANAANDREY

9not10 50

Jan 21st, 2019
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4. int main()
  5. {
  6. unsigned x,uc;
  7. cin>>x;
  8. uc=x%10;
  9. x/=10;
  10.  
  11. while (x)
  12. {
  13.     if (x%10<uc)
  14.     {
  15.     cout<<"NU";
  16.     break;
  17.     }
  18.     uc=x%10;
  19.     x/=10;
  20. }
  21. if (!x)
  22.     cout<<"DA"<<endl;
  23.  
  24. return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement