subject

Write a program in JAVA to perform the following operator based task: Ask the user to choose the following option first: If User Enter 1 - Addition If User Enter 2 - Subtraction If User Enter 3 - Division If User Enter 4 - Multiplication If User Enter 5 - Average Ask the user to enter the 2 numbers in a variable for first and second(first and second are variable names) for the first 4 options mentioned above and print the result. Ask the user to enter two more numbers as first and second 2 for calculating the average as soon as the user chooses an option 5. In the end, if the answer of any operation is Negative print a statement saying "Oops option X(1/2/3/4/5/) is returning the negative number" NOTE: At a time users can perform one action at a time.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 24.06.2019 04:30
What is the process in which the software development team compiles information to determine the final product
Answers: 1
question
Computers and Technology, 24.06.2019 19:00
In python a floating-point number must be written using scientific notation?
Answers: 1
question
Computers and Technology, 24.06.2019 21:50
Maddie is traveling to india and would like to document her trip for friends and family to access online. what tool would be best? app blog listserver web page
Answers: 1
question
Computers and Technology, 25.06.2019 05:00
Craig keeps missing important staff meetings and getting double-booked for appointments. craig should use scheduling software a database diagramming software a word processor
Answers: 1
You know the right answer?
Write a program in JAVA to perform the following operator based task: Ask the user to choose the fol...
Questions
question
Mathematics, 24.06.2021 18:40
question
Mathematics, 24.06.2021 18:40
question
Physics, 24.06.2021 18:40
question
Mathematics, 24.06.2021 18:40
question
Mathematics, 24.06.2021 18:40
Questions on the website: 13722361