Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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