fb pixel

Are digits non-decreasing?

Given a number n, your task is to write a program that would tell if the digits of n are not decreasing. The program should print Yes if the digits are non-decreasing and No otherwise.
Input
Output
1234578
Yes
111345726879
No
123334
Yes
 
To check your solution you need to sign in
Sign in to continue