Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream.h>
- int tc(int x){
- if(x<10)
- return 1;
- else
- if((x%10)>((x/10)%10))
- return tc(x/10);
- else
- return 0;
- }
- int main (){
- int x;
- cin>>x;
- if(tc(x))
- cout<<"DA";
- else
- cout<<"NU";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement