Skip to main content
5 events
when toggle format what by license comment
Dec 14, 2014 at 5:12 comment added Ibrahim I've fixed the bug. Check it out.
Dec 14, 2014 at 5:11 history edited Ibrahim CC BY-SA 3.0
I apologize. I made a mistake in inner for loop. The initial condition should be "height - line" and not "height - 1".
Dec 13, 2014 at 20:13 comment added firefly I do print the '#''s, I just didn't add that in the question as that's in another loop, I have no problem with the '#''s. The code as you describe it doesn't work. That code was the first thing I tired . It prints out an equal number of spaces and shifts the whole pyramid to the right x number of spaces. Now the code I entered, most definitely does work. Each line has one space less with my code. With your code each line has the same number of spaces. The problem is, logically this doesn't make sense and I had hoped someone can explain why it does. ie, why does my code work. Thanks
Dec 13, 2014 at 20:07 comment added firefly I do print the '#''s, I just didn't add that in the question as that's in another loop, I have no problem with the '#''s.
Dec 13, 2014 at 19:50 history answered Ibrahim CC BY-SA 3.0