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 b. Then present a choice of the f
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 b is zero. If so, say that they are not allowed to divi
by 0 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
interface/explanations.)
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: \Java>java CSCI1301ProgramHW7
Welcome to the single operation calculator.
Enter in your first number: 2.5
Enter in your second number: -1.3
You entered the numbers 2.5 and -1.3.
Pick an operation from the menu:
Compute the sum.
Compute the difference.
Compute the product.
Compute the quotient.
Your choice is: 1
The sum of your two numbers is 1.2.
C: \Java>java CSCI1301ProgramHW7
Welcome to the single operation calculator.
Enter in your first number: 17.0
Enter in your second number:
You entered the numbers 17.0 and 0.0.
Pick an operation from the menu:
Compute the sum.
Compute the difference.
Compute the product.
Compute the quotient.
Your choice is: 4
You are not allowed to divide by .
Closing the program.
 Create a program that asks the user for two real numbers,

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!