Lab Pyramid

Pyramid

Overview

Exercise looping, conditional, and IO manipulations.

Two references: 

The control tutorial and <iomanip> document

One implementation sample 

Objective

Print a pyramid

Input Format

Your program will read a single number of an arbitrary size, called size from cin.

Print a pyramid of the height of size.

Repeat the program until user enters a negative size.

Output Format: 

Your program will output a pyramid of the same height as the size.

Sample:

size = 3

Display Pyramid:

  * 

 ***

*****

Note:

To get it started, your pyramid may look like a "right triangle" 

  * 

  **

  ***

More:

<+>  Does your program work with 0 or 1 as input?

<+>  What happens when the input size becomes extremely large? Does it still form a pyramid?

<++>  What if we only want to print 2 stars in second line, 3 stars in 3rd line, etc?

<++>   Can you have more than one way to do this lab?