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
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