Exercise: number guessing game - video
Exercise: number guessing game
Create a simple command line game guessing a whole number.
- Let the computer "think" about a whole number between 1-200 using the rand() function.
- Let the user guess a number.
- Tell the user if his guess was bigger or smaller than the number the computer "thought" of or tell him if he hit the right number.
- At this point the user only has one guess, though as a bounus you can allow the user to guess several times.
Published on 2015-03-14
If you have any comments or questions, feel free to post them on the source of this page in GitHub. Source on GitHub.
Comment on this post