The user will enter the number of '*'s on the 1st row (ntop) and then the number of rows forming the trapezoid (nrows). (using <iostream>, cout)
For instance, an inverted trapezoid with 7 '*"s in the 1st row and 3 rows forming the
inverted trapezoid looks like:
(this pyramid is centered, in case it isnt when its posted). Also, each descending row has two less asteriks than the above row.
im having trouble with the four loop displaying the number of "*" and " ". I know its a relationship with variables in the for loops, my output is just never doing what i want it to.
THis is the guideline for the for loop:
Use for loops to display the inverted trapezoid. Your outer for loop will iterate
the total number of rows times. For each row use one nested for loop to display
blanks (the 1st row contains no blanks) and another nested for loop to display
the characters '*'.
Heres my for loops so far:
for (i = nrows; i >= 1; i--)
for (j = 0; j >= nrows; j++)
cout << " ";
for (k=ntop; k >= 2; k--)
cout << "*";
The output is just blank as of now.