Question
Write a c program. Use the rand function to produce two positive two-digits integers (0 includes). The program should then prompt the user with a
Write a c program. Use the rand function to produce two positive two-digits integers (0 includes). The program should then prompt the user with a question, such as How much is 12 + 3? The user then inputs the answer (Enter -1 to stop). Next, the program checks the users answer. If its correct, the program should randomly display any of the following messages. 1. Very good! 2. Excellent! 3. Nice work! 4. Keep up the good work! If the answer is wrong, randomly display any of the following messages. 1. No. Please try again. 2. Wrong. Try once more. 3. Don't give up! 4. No. Keep trying After displaying the message, the program should display the next question. A separate function should be used to generate each new question. This function should be called once when the application begins execution and each time after the user answers the question. A maximum of 10 questions to be given to each user. At the end of the 10 questions, the program should display the following message Message Condition Winner Total correct answers > Total wrong answers Loser Total wrong answers > Total correct answers Draw Total correct answers = Total wrong answers Note: The program should ensure that no questions are repeated.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started