Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am trying to create a simple math testing program. Using a switch statement the user is prompted to enter a number 1-4, 1 to

I am trying to create a simple math testing program. Using a switch statement the user is prompted to enter a number 1-4, 1 to calls addition method 2 calls subtraction method 3 multiplication method.I ran into a few problems.First I want option 4 to give out a random type of problem(+,-,*). Also being able to loop and let the user continue practicing after being prompted if they want to continue by entering a certain character. image text in transcribed

The methods return ints(number of correct problems answered). I am also want to be able to display the how many the user got correct for each type of problem at the end but cannot without having the call outside of switch

optionSelection = menuOptions(); switch (optionSelection) case 1: correctAddition = addition(); break; case 2: correctSubtraction = subtraction(); break; case 3: correctMultiplication = multiplication(); break; default: Console.WriteLine("default"); break; correctAddition = addition(); correctSubtraction = subtraction(); correctMultiplication = multiplication(); Console.WriteLine("Correct Addition {@}. Correct Subtraction {1}." + "Correct Multiplication {2}." ,correctAddition, correctSubtraction, correctMultiplication)

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

Development Of Knowledge Framework For Affective Content Analysis

Authors: Swarnangini Sinha

1st Edition

B0CQJ13WZ1, 979-8223977490

More Books

Students also viewed these Databases questions