I think I got most of it already but I have one issue that I don't see how to solve. If I make the height 8 (for example) it'll print 1 empty row first and then 7 rows with hashes, the last row will have 7 hashes instead of the desired 8. Here's the code.
for (int r = 0; r < i; r++) // makes a row
{
for (int s = i - 1; s > r; s--) // print left spaces
{
printf(" ");
}
for (int h = 0; h < r; h++) // print left hashes
{
printf("#");
}
for (int g = 0; g < 2; g++) // print gap
{
printf(" ");
}
for (int h = 0; h < r; h++) // print right hashes
{
printf("#");
}
printf("\n");
And this is what it makes
Height: 5
# #
## ##
### ###
#### ####
I forgot to mention "i" is the user's input for height.
How could I fix this? Thanks.