Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem: Write a program that will help an elementary school student to learn division with a remainder. Use rand to produce two positive integers, the

image text in transcribed
Problem: Write a program that will help an elementary school student to learn division with a remainder. Use rand to produce two positive integers, the first one as dividend has two digits (10-99) and the second one as divisor has one digit (2-9). The program should then output a question using the numbers, such as: What is 26 divided by 7? The student then types the answer with two numbers, the first one is quotient and the second one is remainder. The program checks the student's answer. If they both are correct, print "Very good!" Otherwise, print "Sorry, you are wrong!" Then present the correct answer and ask another division question until the answer is -1 for the quotient. Requirements: Use a do while loop. You must use rand and srand functions to generate two integers each time. Suggested screen design: What is 24 divided by 9? Enter quotient: 2 Enter remainder: 6 Very good! what is 53 divided by 6? Enter quotient: 4 Enter remainder: 14 Sorry, you are wrong! The answer is: 53 divided by 6 io 8 with the remainder 5 what is 84 divided by 8? Enter quotient: -1 Goodbye Press any key to continue

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

Students also viewed these Databases questions

Question

Did the team members feel that their work mattered

Answered: 1 week ago

Question

3. What may be the goal of the team?

Answered: 1 week ago