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:
Get Free Quote!
310 Experts Online