0

I managed to print the correct number of spaces. However, when it comes to the hashes, im stuck in 2 per row instead of increasing by one the number of them as the number of rows increases. Any help in how i could deal with the hashes problem? Beginner programmer here. Thanks in advance.

here is the code and the output when i execute the program

2

Here's a hint. How many hashes in the first row? The second row? The third row? Does the number of hashes in any given row have any relationship to the height of the pyramid? Or is the number of hashes related to something else?

If that's not enough of a hint, try making a pyramid with no leading spaces.

The interesting thing is that most people get the hashes right and the spaces wrong. ;-)

If this answers your question, please click on the check mark to accept. Let's keep up on forum maintenance. ;-)

  • your comment was very heplful. thank you! – Gabriel Barreto Jan 5 '18 at 5:10

You must log in to answer this question.

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