1

I had the exact same issue. The output looks correct but it is not. Just ask yourself if you really need what you called "spaces2"


1

I solved this by using another variable in addition to height. I used numHashes and initialized that to 2. Then, when I went through the loop, I didn't have to worry about alignment, I just printed out the right number of blank spaces and the right number of hashes. It appears as though you are not taking advantage of the libraries provided by the class, ...


1

Hello Jesvant Somepalli, I would highly recommend that you should watch the walkthrough again, if you have watched already, while taking notes. Use a pen and a paper first to draw the pyramid, while working in your head, how on this planet earth, you would try to instruct the computer to do the same. Nevertheless, I will try to the best of my ability to ...


1

why wouldn't you prefer to use a loop. there has to be some sort of repetition which surely means that we need a loop of some kind. although it may be possible to implement the pyramid part without loops (still that would be HORRIBLE way to do it), you won't be able to enforce the user to enter a height in the specified range since you won't write infinite ...


Only top voted, non community-wiki answers of a minimum length are eligible