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, 21.06.2019 19:30
Which of the following are types of formatting you can apply to a spreadsheet? choose all that apply.
Answers: 3
question
Computers and Technology, 22.06.2019 10:30
This first part of the film shows the early history of motion pictures. how accurate do you think the portrayal of the early motion picture industry is? why? is historical accuracy important in films and theatre productions? explain. in the scene where don is going to the party (starting at time code 14: 51), we see a street scene as he first rides with cosmo and then with kathy. what aspects did the filmmaker include to make the scene look and feel like don, cosmo, and kathy are riding in a car on a street? think about elements such as scenery, sound, props, lighting, and so on. a "talkie" picture is shown starting around time code 21: 15. how does the audience in the film react to the "talkie"? what influence do audiences have on film and theatre performances? how do film and theatre actors influence audiences? in the musical scene with cosmo (starting at time code 27: 00), how does the actor use props? what is the result? do you think the use of props effectively fulfilled the artistic vision for this musical number? why or why not?
Answers: 1
question
Computers and Technology, 23.06.2019 15:20
What does a bonus object do? a. subtracts lives b. keeps track of a player's health c. gives a player an advantage d. makes text appear
Answers: 1
question
Computers and Technology, 24.06.2019 13:30
Write a program that uses a two-dimensional array to store the highest and lowest temperatures for each month of the year. the program should output the average high, average low, and the highest and lowest temper- atures for the year. your program must consist of the following functions: a. function getdata: this function reads and stores data in the two- dimensional array. b. function averagehigh: this function calculates and returns the average high temperature for the year. c. function averagelow: this function calculates and returns the aver- age low temperature for the year. d. function indexhightemp: this function returns the index of the highest high temperature in the array. e. function indexlowtemp: this function retur
Answers: 3
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
Business, 25.02.2021 02:20
question
World Languages, 25.02.2021 02:20
question
Mathematics, 25.02.2021 02:20
question
Mathematics, 25.02.2021 02:20