Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use c++ 3-It will be important to understand how random numbers are generated using the rand) function. You will also need to have a

Please use c++ image text in transcribed
3-It will be important to understand how random numbers are generated using the rand) function. You will also need to have a basic understanding of a while or for loop You are to write a program in which the user tries to guess which number (from 0 to 99, inclusive) that the program generates, based on the rand() function. First the program asks the user to guess which number will be generated, and if the user is correct, it prints "Good guess!" and if the user is incorrect, it prints "Sorry too high or too low (depend of the case), try again!" Some other specifications The program should repeatedly ask the user for a guess and generates the outputs "Number picked: "followed by the number, and the statements as to whether it was correct or not, too high or too low If the user enters a number of O or less, the program should print "Goodbye" and exit. 1. 2. the user enters a number greater than 99, the program should output "Number too high, guess againl" and then ask for another number. 4 When the answer is correct the program must generate a new random number 99 and ask for a new guess

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

Database And Expert Systems Applications Dexa 2022 Workshops 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 In Computer And Information Science 33

Authors: Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil ,Bernhard Moser ,Alfred Taudes ,Atif Mashkoor ,Johannes Sametinger ,Jorge Martinez-Gil ,Florian Sobieczky ,Lukas Fischer ,Rudolf Ramler ,Maqbool Khan ,Gerald Czech

1st Edition

3031143426, 978-3031143427

More Books

Students also viewed these Databases questions

Question

Explain in detail the different methods of performance appraisal .

Answered: 1 week ago