Question: Create a calculator program in Java. The program asks the user to enter two numbers, then it asks the user to select wether they want
Create a calculator program in Java. The program asks the user to enter two numbers, then it asks the user to select wether they want to add, subtract, multiply,or divide. Then the program outputs the result and then it asks the user whether they want to use the calculator again by asking a/n? if the user selects a the program runs again. Otherwise, the program terminates and displays "The End".
sample output(user input is in Bold):
Welcome to my calculator program
Input two integers: 75 2
input what operation you'd like to perform : +
75 + 2 = 77
Do you want to use the calculator again (a/n) ?: a
Input two integers: 12 4
input what operation you'd like to perform : *
12 * 4 = 48
Do you want to the use the calculator again (a/n)? : n
The end
Step by Step Solution
There are 3 Steps involved in it
Question You are answering ... View full answer
Get step-by-step solutions from verified subject matter experts
