Advertisement
Eddie_1337

15-207

Apr 12th, 2017
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.22 KB | None | 0 0
  1. #include <iostream.h>
  2. int tc(int x){
  3.     if(x<10)
  4.         return 1;
  5.     else
  6.         if((x%10)>((x/10)%10))
  7.             return tc(x/10);
  8.         else
  9.             return 0;
  10. }
  11. int main (){
  12.     int x;
  13.     cin>>x;
  14.     if(tc(x))
  15.         cout<<"DA";
  16.     else
  17.         cout<<"NU";
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement