Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int i=0, l, r, x, x1, x2, x3, x4;
- cin >> l >> r;
- for( ;l<=r; l++)
- {
- x = l;
- x4=x%10;
- x/=10;
- x3=x%10;
- x/=10;
- x2=x%10;
- x/=10;
- x1=x%10;
- x/=10;
- if(x1<x2 and x2<x3 and x3<x4)i++;
- }
- cout << i;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment