Question: Write a program that allow a user to guess a number generated by the computer between 1 to 100. For example, the computer generated a

Write a program that allow a user to guess a number generated by the computer between 1 to 100.

For example, the computer generated a number 25, the user guess 50, the program will print a

message that says Lower.... User then guess again and enters 45. Program will print Lower.. User

then enters 15, program will print Higher.... User guesses again and enters 25. Until the user match

the number.

1. You will have to use functions for this program, no global variables are allowed.

2. Draw a structure chart to show all your functions and how they communicate with up and

down arrows.

3.

No loops and arrays allowed

.

Sample test run

Guess the Computer Number Game

Computer: I have a number in mind, guess my number

Take a guess: 60

Lower...

Take a guess: 30

Lower...

Take a guess: 10

Higher...

Take a guess: 15

Higher...

Take a guess: 17

Congratulations, you got it!

You took 5 tries.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!