Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Guide To Client Server Databases

Authors: Joe Salemi

2nd Edition

1562763105, 978-1562763107

More Books

Students also viewed these Databases questions