enter image description here

I understand why it does because I am getting the input and subtracting from that.

My question is do I always have to print the spaces first before the hashes?

And can I do it without using a if statement but just for loops?


Yes, you always have to print the spaces first (well, except for height=1) because check50 looks for EXACT outputs. A missing or extra space, line feed, or anything else will cause check50 to reject it.

And yes, you can do it with just for loops. I did it without any if statements in the entire program.

If this answers your question, please accept this answer to remove the question from the unanswered question pool. Let's keep up on forum housekeeping. ;-)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .