Answered You can hire a professional tutor to get the answer.

QUESTION

C Language program: The computer generates a number between 1 and 20. The user must guess the number.

C Language program:

For this assignment, you will create a guessing game. The computer generates a number between 1 and 20. The user must guess the number. The name of the function should be twentyNum(). Each call to twentyNum () from the driver program for homework will generate only one game; however, the score between the human and the computer must be kept for as long as you are running your homework driver program. Example output...

**********************

Welcome to the guessing game!

I am thinking of a number between 1 and 20.

Enter your guess or press 0 to stop.

10

The number is higher.

Enter your guess or press 0 to stop.

15

The number is higher.

Enter your guess or press 0 to stop.

18

You got it! The number was: 18

The current score is Computer: 1 Human: 3

Notes: 

You may limit the number of guesses if you like, but this is not required.

When the user enters 0 to exit, it will be considered a forfeit and the computer wins.

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question