Advertisement
IISergeyII

Untitled

May 17th, 2018
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.55 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. #include <algorithm>
  4. #include <math.h>
  5. #include <vector>
  6. #include <fstream>
  7.  
  8. using namespace std;
  9.  
  10. int main()
  11. {
  12.     const int N = 4;
  13.     int coins[N] = {1, 2, 3, 4};
  14.     for (int i = 0; i < 3; i++) {
  15.         for (int j = i+1; j < 3; j++) {
  16.             for (int l = j+1; l < 3; l++) {
  17.                 for (int h = l+1; h < 3; h++) {
  18.                     cout << coins[i] << coins[j] << coins[l];
  19.                     cout << endl;
  20.                 }
  21.  
  22.             }
  23.         }
  24.     }
  25.  
  26.  
  27.  
  28.     return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement