Skip to content

Latest commit

 

History

History

more

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Implements a program that prints out a half-pyramid triangle with gap of a specified height, per below.

$ ./mario
Height: 4
   #  #
  ##  ##
 ###  ###
####  ####

Usage

Program should behave per the example below. Assumed that the underlined text is what some user has typed.

$ ./mario
Height: 4
   #  #
  ##  ##
 ###  ###
####  ####
$ ./mario
Height: 0
$ ./mario
Height: -5
Height: 4
   #  #
  ##  ##
 ###  ###
####  ####
$ ./mario
Height: -5
Height: five
Height: 40
Height: 24
Height: 4
   #  #
  ##  ##
 ###  ###
####  ####