Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int count=0;;
- for (int i=10000; i<=77777; i++){
- if ((i / 10000 <=7) && (i / 1000 % 10 <=7) && (i / 100 % 10 <=7) && (i / 10 % 10 <=7) && (i % 10 <=7)){
- if (((i / 10000) <= (i / 1000 % 10)) && ((i / 1000 % 10)<=(i / 100 % 10 )) && ((i / 100 % 10 )<=(i / 10 % 10 )) &&((i / 10 % 10 )<=(i % 10 ))){
- count++;
- }
- }
- }
- cout<<count;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement