Write a program that lets the user guess an integer between 1 and 10. The integer should be randomly selected by your program when it starts up. Your player is allowed to guess three times - if they guess correctly, they win and the program ends. If they guess incorrectly they should be told if the number they guessed was too high or too low and then be asked to guess another time. At the end of the program, you should display the secret number as well as how many attempts it took to guess that number. Here are a few sample runnings of your program:
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
23 | 24 | 25 | 26 | 27 | 28 | 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 | 1 | 2 | 3 | 4 | 5 |
Get Free Quote!
255 Experts Online