Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Richard T. Watson

6th Edition

1943153035, 978-1943153039

More Books

Students also viewed these Databases questions

Question

Illustrate with an example the problems caused by commingled data.

Answered: 1 week ago