Five months is too long for a problem like mario or pretty much any other problem in the course.
You could try solving it manually with low-tech tools (e.g., a pencil and a paper) trying to draw half a pyramid row-by-row from top to bottom and left to right.
Suppose the input is 5, we should get the following output:...
##
###
####
#####
######
By analyzing the problem, we can get information like:
The initial number of spaces to be printed out in terms of the height (i.e., 5) is
height + 1 - the initial number of hashes
The initial number of hashes is 2.
The number of spaces decreases each row until it becomes 0 in the last row.
The number of hashes increases by 1 until it becomes
height + 1
in the last row.
Using this information, we could write the following pseudocode (assuming height
is a valid integer inputted by the user):
calculate the initial number of spaces in terms of height
calculate the initial number of hashes in terms of height
// draw the rows
for (i = 0 to i < height, increment i)
// draw spaces
for (j = 0 to j < spaces, increment j)
print a space
// draw hashes
for (j = 0 to j < hashes, increment j)
print a hash
move to the next row
decrement the number of spaces
increment the number of hashes