Computer Science Homework Solutions
Problem
#104817

C program using functions, switch statements, if statements

I have a hard time getting started.  The program is to help a student learn multiplication.  I have to use the rand function to produce two positive one-digit integers.  The program should type a question such as:
How much is 6 times 7?

The student will then type the answer.  The program will then check the answer .  If it is correct, print one of the following messages:

Very Good!
Excellent!
Nice Work!
Keep up the good work!

And then ask another multiplication question.  If the answer is wrong, print one of the following messages:

No.  Please try again/
Wrong.  Try once more.
Don't Give up.
No.  Keep trying.
Then let the student try the same question again repeatedly, until the student gets it right.

I will have to come with two functions to print the messages.  Write a function to print one of the messages when the correct answer is entered and a function to print one of the messages when it is the wrong answer..

Solution
What is this?
By OTA - Overall OTA Rating
Yupei Xiong, PhD - 4.8/5
Purchase Cost Now
$2.19 CAD (was ~$15.96)
Included in Download
  • Plain text response
  • Attached file(s):
    • 104817.c
$2.19 Instant Download
Add to Cart
Why you can trust BrainMass.com
  • Your Information is Secure
  • Best Online Academic Help Service
  • Students find real academic Success
Related Solutions
Browse