Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a method that generates two random integers vall and val2 between 1 and 9, and displays the question How much is [vall] times [val2]?.

image text in transcribed

Write a method that generates two random integers vall and val2 between 1 and 9, and displays the question How much is [vall] times [val2]?". The method returns the value of val1 * val2. For example, if val1 is 5 and val2 is 7, the method displays: How much is 5 times 7? Then, it returns 35. Write a main method that prompts the user to guess answer of a generated question. The program should repeat as much as the user wants. Finally, the program must displays the score of corrected answers. Sample run of the program How much is 6 * 7: 40 Incorrect answer. The correct answer is 42. Do you want to continue (y): Y How much is 3 * 7: 21 Correct answer. Do you want to continue (y): y How much is 2 * 4: 8 Correct answer. Do you want to continue (y): Y How much is 5 * 7: 35 Correct answer. Do you want to continue (y): Y How much is 8 * 9: 80 Incorrect answer. The correct answer is 72. Do you want to continue (y): Y Your score is 3/5

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

Beginning ASP.NET 2.0 And Databases

Authors: John Kauffman, Bradley Millington

1st Edition

0471781347, 978-0471781349

More Books

Students also viewed these Databases questions

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago