/*
Write a program the nested for loops that display the output below.
0
0 1
0 1 2
0 1 2 3
0 1 2 3 4
0 1 2 3 4 5
*/
#include <iostream>
#include <cmath>
#include <cstdlib>
#include <iomanip>
using namespace std;
int main ()
{
for (int i=0; i<6; i++)
{
for (int n = 0; n < i+1; n++)
{
cout << setw(5) << n << endl;
}
}
system ("pause");
return 0;
}