1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#include <iostream> using namespace std; bool is_increasing(int n) { if(!(n/10)) { return true; } return ((n - (n/10)*10) >= (n/10 - (n/100)*10)) && is_increasing(n/10); } int main() { /* int a; cin >> a; cout << is_increasing(a) << endl; return 0; */ }