Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Objectives : using the pseudo-random number generator, repetition. Write a program that will help an elementary school student learn multiplication. Create a loop to do

Objectives: using the pseudo-random number generator, repetition.

Write a program that will help an elementary school student learn multiplication.

  1. Create a loop to do the following:
  2. Use rand() to produce two positive integers in the range 1 to 12. It should then type a question such as: How much is 6 times 7?
  3. Input the student's answer (you do not need to validate, assume a valid integer is entered.
  4. If the student answers -1, then exit the loop--the student is done.
  5. Check the student's answer.
  6. If it is correct, print Very good!
  7. Otherwise, the answer is wrong, so print No. Please try again. and then require the student try the same question again repeatedly until the student finally gets it right. (a nested loop).
  8. After the student answers the question correctly, loop back up to step 1 above and ask another multiplication question.

You must:

  1. Complete this assignment by the due date.
  2. Submit your work to the discussion board
  3. You will be randomly assigned TWO students to peer review immediately after the posting is due. Compile and run each program, then critique the work for:
    • proper variable naming
    • proper data types
    • proper code indentation
    • correctness of the algorithm
    • each loop must have exactly one entry point, and one exit point. The use of the break statement to exit a loop is unacceptable.

IN C++

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

The Manga Guide To Databases

Authors: Mana Takahashi, Shoko Azuma, Co Ltd Trend

1st Edition

1593271905, 978-1593271909

Students also viewed these Databases questions

Question

How do Dimensional Database Models differ from Relational Models?

Answered: 1 week ago

Question

What type of processing do Relational Databases support?

Answered: 1 week ago

Question

Describe several aggregation operators.

Answered: 1 week ago