Question
Write a program that continuously displays two numbers between 0 and 100 and waits for the user to enter the sum of the two numbers.
Write a program that continuously displays two numbers between 0 and 100 and waits for the user to enter the sum of the two numbers. If the sum is wrong then stop and display the count of how many they got right. (HINT: You do not need to use a break statement to exit the loop)
Input Format An integer containing the users sum.
Output Format If the user gets the sum correct then display correct and move on to the next random problem. If the user gets a sum incorrect then stop and display the count of the number of sums they got right.
Sample Run
93+60=153 Correct! 55+16=71 Correct! 37+11=48 Correct! 57+96=151 Correct Solutions: 3
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