Solution: Random Number
Let's discuss the solution to the exercise on random numbers.
We'll cover the following
Problem
This exercise uses a random number for a guessing game. Create a console application called Guessing Game that meets the four requirements below.
- Display the following:
Guess the computer’s number between 1 and 10. You have 3 attempts!
. - Have the computer select a random number from 1-10.
- Have the ability to guess the computer’s number three times.
- Display a message saying if the guess was low, high, or correct.
Solution
Have a look at the solution’s code.
Get hands-on with 1400+ tech skills courses.