Advertisement
IISergeyII

Untitled

May 17th, 2018
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.66 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 = 0; j < 3; j++) {
  16.             for (int l = 0; l < 3; l++) {
  17.                 for (int h = 0; h < 3; h++) {
  18.                     cout << i*coins[0] << " "
  19.                         << j*coins[1] << " "
  20.                         << l*coins[3] << " "
  21.                         << h*coins[4];
  22.                     cout << endl;
  23.                 }
  24.  
  25.             }
  26.         }
  27.     }
  28.  
  29.  
  30.  
  31.     return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement