Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- unsigned c1,c2,c3,c4,nr;
- for (c1=1;c1<9;c1++)
- for (c2=c1+1;c2<=9;c2++)
- for (c3=0;c3<=c2-1;c3++)
- for (c4=c3+1;c4<=9;c4++)
- {
- nr=c1*1000+c2*100+c3*10+c4;
- cout<<nr<<",";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement