Advertisement
STANAANDREY

pb4

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