I created a loop to print the required spaces and a loop to print the required hashes. The program works. However, checkcs50 doesn't like it. Here are checkcs50 statements:
:( handles a height of 0 correctly
\ expected an exit code of 0, not output of "Please enter a whole number
from 1 to 2..."
:( handles a height of 1 correctly
\ expected output, but not "\n##\n"
:( handles a height of 2 correctly
\ expected output, but not "\n ##\n###\n"
:( handles a height of 23 correctly
\ expected output, but not "\n ##\n ..."
:( rejects a height of 24
\ expected output, but not "\n ##\n ..."
Here are my questions:
Are we to reject 0 as an input? Currently I do because it doesn't make sense to build a zero level pyramid.
It appears checkcs50 doesn't like my printf statements to print the spaces and hashes. I'm confused. I met the criteria for the assignment by printing a pyramid. How am I to print hashes and spaces without printf statements? As I said, I created a loop for each. What kind of statement am I to use to print hashes and spaces if not a printf statement?
Please help Thanks.