Apr 7, 2009 at 12:09pm
Hi there i'm trying to find the logic behind the following question.
Write a C++ program with a nested loop structure that displays the following pyramid in "*":
******
********
**********
************
**************
****************
*****************
********************
It is supposed to be a pyramid built in *'s the first row starting with 6 and the last row with 20 stars.
Last edited on Apr 7, 2009 at 12:14pm
Apr 7, 2009 at 5:05pm
Here is a hint:
Two for-loops.
The outer loop starts at 6 and goes to 20.
The inner loop starts at 0 and goes to the outer loop value
You figure out how to make the stars print.
Last edited on Apr 7, 2009 at 5:05pm