Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C PROGRAMMING Write a program that randomly draws multiplication problems (in chapters 1-9) or division tasks for elementary students. The division problems must be such

C PROGRAMMING

Write a program that randomly draws multiplication problems (in chapters 1-9) or division tasks for elementary students. The division problems must be such that the result is an integer (use the multiplication algorithm from the previous section). The program asks a question to which the user answers. The questions are in the form: Enter -1 to end How much is 5 times 3? 15 Correct! Enter -1 to end How much is 9 times 7? 62 Incorrect, please try again> 63 Correct! The program examines whether the answer is correct or incorrect and provides feedback. If the answer is incorrect, the program will ask the same question again until the answer is correct. Use random numbers to generate tasks. The program keeps track of the number of correct and incorrect answers and tells you whether the test result is passed (= at least as many or more correct answers than the wrong ones) or rejected (= incorrect answers more than correct). Finally, print the correct and incorrect answers and the test result in the following format: You got 2 answers right, and 1 went wrong Your rating is: "Approved" Execution of the program ends when the user enters the number -1.

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

Spatial Databases A Tour

Authors: Shashi Shekhar, Sanjay Chawla

1st Edition

0130174807, 978-0130174802

More Books

Students also viewed these Databases questions