Right I know that I need a nested for loop, maybe even a nested loop inside the first nested for loop, my problem is that I can't figure out the syntax behind it.
Like I said I know that I need a nested loop, however I can't see how to type the syntax to create this triangle formatted with setw():
* <-----3 spaces before *
***<-----2 spaces before *
*****<-----1 space before *
*******<-----0 spaces before *
I DO know that the nested for loop is necessary to determine the rows and stars. The outside loop is for rows and the inside loop is for determining the stars in each row. With that in place I could use setw() to make the correct number of spaces in each row.
If I had to guess on how to enter this I would say:
CODE
for (int rows = 1; rows <= numRows; rows++)
{
for (int i = 1; i <=
Right there at the end is where I draw a blank
Any thoughts anyone?