r/programminghomework • u/Raider7oh7 • Sep 26 '18
c++ homework help
random number guessing game. 1-100
i have been stuck for hours and shit is a mess now. idk even know what im staring at anymore, any help appreciated.
2
Upvotes
View all comments
Show parent comment
2
u/thediabloman Sep 26 '18
It looks okay. I would probably move your three instances of calls to the
getGuessmethod into the beginning of the while loop.If you want to challenge yourself, think of a way to do it without a loop. Imagine each round as a separate instance of the game with different boundaries. What are the boundaries of when the game repeats and when it does not. Hint: It is possible for a method to call itself.