Question: Game: Prediction C++ Write a C++ program that generates a random two-digit integer. The program prompts the user to predict the generated number by entering

Game: Prediction C++

Write a C++ program that generates a random two-digit integer. The program prompts the user to predict the generated number by entering a two-digit integer, and then determines the accuracy of the users prediction according to the following rules:

If the users prediction matches the generated number exactly, the accuracy is 100%.

If one digit in the users predicted number matches a digit in the generated number, the accuracy is 50%.

If none of the digits in users predicted number matches with the generated number, the accuracy is 0%.

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!