Hi everyone I made sure to do my research and go through the already posted questions. I am certain my while condition is wrong after research but don't understand the correction. my program runs but will accept negative number but once over 23 it finishes and will not move onto my pyramid.
Your do..while looks correct. If you have problems with it, you most likely forgot to save, forgot to compile, or called a completely different executable.
However I do see some problems with your inner loops. First printed row should contain
height-1 spaces and two hashes, but you have
height+1 spaces and
height-1 hashes (but those hashes for any row!). I used
row variable (I use singular name for a number referring to a specific row) in both loops.