Download presentation
Presentation is loading. Please wait.
1
programs. at the code at the site.
2
I have not coded the too high part yet.
5
to look at is the do...while.
6
eventually I will leave.
8
If you test at the end of the loop, you will always do it once
If you test at the end of the loop, you will always do it once. I put in 0 dor data_input. I enter the loop, execute it and then the while checks to see if I want to do it again. Since ct is now 2 and data_input is 0, I do not want to do it again so I exit.
9
When I test at the beginning, I may not enter the loop.
10
Now I back at the guess game, I want to add a loop that will continue while theRanNum is not equal to myGuess. When they are equal, I will exit.
11
I have the do, now I need to add the while and the condition.
12
I will do the loop once at least
I will do the loop once at least. I will continue doing it as long as they are not equal.
16
Now I want to add code to ask the user if they want to play again.
20
The way it is set now, capital N will get me out, any other entry by the user will keep me in. If I want to take the user entry and convert to upper case prior to testing with N, I can use this method.
25
to do the convert.
52
Without var they do not act as local.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.