Question: Q1. Write a Java program to make a simple calculator as follow: a. Ask the user to enter two numbers (using Scanner class) and store

Q1. Write a Java program to make a simple calculator as follow:

a.

Ask the user to enter two numbers (using Scanner class) and store these numbers into two variables; x and y

b.

Ask the user to select the required operation; +, -, * or / and use the switch statement to conduct the required task.

c.

Ask the user if he/she want another operation using for loop statement and continue on performing operations until the user type -1.

d.

Print the result to the user

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!