Untitled

mail@pastecode.io avatar
unknown
c_cpp
a month ago
365 B
0
Indexable
Never
#include <iostream>
#include <algorithm>
using namespace std;

int main()
{
  int n;
  cin >> n;

  int niza[n];
  for(int i = 0; i < n; i++) {
    cin >> niza[i];
  }

  for(int i = 0; i < n; i++) {
    for(int j = i; j < n; j++) {
        for(int k = i; k <= j; k++) {
          cout << niza[k] << " ";
        }
        cout << endl;


    }
  }

  return 0;
}
 
Leave a Comment