1. Engineering
  2. Computer Science
  3. integer math create an application that uses random integers to...

Question: integer math create an application that uses random integers to...

Question details

Integer Math
Create an application that uses random integers to test the user’s knowledge of arithmetic. Let the user choose from addition, subtraction, multiplication, and division. The integers used in the problems should range from 20 to 120. When giving feedback, use color to differentiate between a correct answer response, versus an incorrect answer response. Also check for non-integer input. Preparing division problems requires special consideration because the quotient must be an integer. Therefore, you can use a loop to generate new random values for the second operand until you find one that divides the first operand evenly. Use the Mod operator to verify that the integer division remainder is zero.

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution