Graderpractice for programmers

273387 MAD 2562 - Mini Test 1

Awaiting submission
Print out a pyramid of stars exactly 3 rows high.
Awaiting submission
The input is the height of the pyramid (integer). The output is is the number of stars required on the bottom row.

If the height is 3 then the pyramid will be:

  *
 ***
*****
Therefore the number of stars on the bottom row is 5.

Awaiting submission
You only have 100 stars! ********...
  *
 ***             => 9 stars
*****
The input is the height of the pyramid. The output is "OK" if the number of stars is 100 or less. The output is "NOT ENOUGH" if the number of stars is greater than 100.
Awaiting submission
It is time to build the pyramid at last!

Read in 2 lines. The 1st line is the height of the pyramid. The 2nd line is the character to use.

Print out the pyramid if the input is valid. If the 1st line of input is not a number then print "INVALID HEIGHT". If the 2nd line of input is not a single character then print "INVALID CHARACTER".