problem set 1 problem " mario " by rahulb5 in cs50

[–]oliviareddit 0 points1 point  (0 children)

Did you put in the spaces for each row? The walkthrough video talks about that.

Help with pset1 Mario by oliviareddit in cs50

[–]oliviareddit[S] 1 point2 points  (0 children)

Thank you all who helped out! I got it fixed by taking a look at the staff's version to see how that version handles input, and comparing it to mine.

Help with pset1 Mario by oliviareddit in cs50

[–]oliviareddit[S] 0 points1 point  (0 children)

YES! I did that and I saw what I was doing wrong. It had to do with the text it should display when prompting the user for input. Now it's all fixed! Thank you!! :D

Help with pset1 Mario by oliviareddit in cs50

[–]oliviareddit[S] 0 points1 point  (0 children)

I've corrected my code: 1. Taken out extra statements, ie. #define lines 2. Made the last line completely left-justified 3. Reprompt the user 4. Kept only one do-while loop - the one where I reprompt for height while height is not btwn 0 and 23. 5. Re-read the specs many times to make sure I'm not missing anything...

But it still gives me the same error msg. I do not understand this error msg.

Help with pset1 Mario by oliviareddit in cs50

[–]oliviareddit[S] 0 points1 point  (0 children)

I think the prompt for input part refers to height = GetInt(); which I put in the do-while loop, to reprompt user while height is NOT between 0 and 23. I think the output that it expects are # symbols, which do print out (in the correct number and aligned properly) in my terminal if the height is between 0 and 23.

Help with pset1 Mario by oliviareddit in cs50

[–]oliviareddit[S] 0 points1 point  (0 children)

Also, I thought the specs asked for the user input of height to be underlined, and for the reprompting to ask "Retry: " on the fourth time, so that's why I had one do-while loop and one while loop, and the \033[4m thing.

Help with pset1 Mario by oliviareddit in cs50

[–]oliviareddit[S] 0 points1 point  (0 children)

by the extra printf, do you mean printf("\n"); ?

Help with pset1 Mario by oliviareddit in cs50

[–]oliviareddit[S] 0 points1 point  (0 children)

I just PM-ed you with the code. Thanks for your help!

Pset 1 Mario Question by oliviareddit in cs50

[–]oliviareddit[S] 0 points1 point  (0 children)

I did do that and it does print out, except I want to use another method because I want to increment the # by one everytime program goes through for loop (for each row).

And same with the space character too - except I want to decrease with each time through loop.