Question: Create a program that asks the user for two real numbers, a and b . Then present a choice of the f basic arithmetic operators
Create a program that asks the user for two real numbers, a and Then present a choice of the
basic arithmetic operators from a menu, addition, subtraction, multiplication, and division.
Prompt the use to enter in a choice. If they select an invalid choice, tell them they selected an inva
choice and exit the program.
Additionally if they select division, check if is zero. If so say that they are not allowed to divi
by and close to program.
Your Program should output something similar to the sample outputs given below.
Your grade will be based on good programming technique comments variable names, assumptio
etc. correct outputs correct mathematical computations and correct program output good us
interfaceexplanations
As part of your upload include your java file and a picture of the programming being run on yc
machine a screen capture like the examples given is fine.
C: Javajava CSCIProgramHW
Welcome to the single operation calculator.
Enter in your first number:
Enter in your second number:
You entered the numbers and
Pick an operation from the menu:
Compute the sum.
Compute the difference.
Compute the product.
Compute the quotient.
Your choice is:
The sum of your two numbers is
C: Javajava CSCIProgramHW
Welcome to the single operation calculator.
Enter in your first number:
Enter in your second number:
You entered the numbers and
Pick an operation from the menu:
Compute the sum.
Compute the difference.
Compute the product.
Compute the quotient.
Your choice is:
You are not allowed to divide by
Closing the program.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
