/******************************************************************************
Online C++ Compiler.
Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.
print
1
1 2
1 2 3
1 2 3 4
*******************************************************************************/
#include <iostream>
using namespace std;
int resolve (4);
int main()
{
int resolve[4] = {1,2,3,4};
for (int i=0; i<4; ++i) {
cout << resolve[i] << " \n";
if (resolve[i] == 4) break;
int x = resolve[i];
for (int j=0 ; j<4; j++) {
if (x==j) break;
cout << resolve[j] << " ";
}
}
}