fork download
  1. #include <iostream>
  2. using namespace std;
  3. // reversed array
  4. int main() {
  5.  
  6. for (int i = 1 ; i < 5 ; i++ ){
  7. for ( int j = 1; j <= i; j++ ){
  8. cout << j++ << endl;
  9. }
  10. cout << endl;
  11. }
  12. return 0;
  13. }
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
1

1

1
3

1
3