Problem 8: Pyramid Of Numbers 2 Solution

The difference between the solutions for problems 7 and 8 is highlighted below:

for (int row = 1; row <= 7; row++)
{
	for (int space = 7 - row; space > 0; space--)
		cout << ' ';
	for (int col = 1; col <= row; col++)
		cout << row;
	cout << endl;
}