Advertisement
STANAANDREY

9bac 40

Jan 21st, 2019
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.26 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6.  
  7.  unsigned c1,c2,c3,c4,nr;
  8.  
  9.  for (c1=1;c1<9;c1++)
  10.  for (c2=c1+1;c2<=9;c2++)
  11.  for (c3=0;c3<=c2-1;c3++)
  12.   for (c4=c3+1;c4<=9;c4++)
  13. {
  14.     nr=c1*1000+c2*100+c3*10+c4;
  15.     cout<<nr<<",";
  16. }
  17.  
  18.  return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement