subject

You MUST use switch statement to complete the following. Write a program to achieve a four-function calculator. The program will first take two real (non-zero) numbers as input from the user. You can safely assume the user will always input two numbers. The program then outputs the following message to prompt another user input:

Please select:
: add two numbers.
-: subtract two numbers.
*: multiple two numbers.
/: divide two numbers.

The user then enters one of the above characters for the program to perform the corresponding calculation on the previously two numbers. If the user enters other character than the above, the program will print out Unknown calculation and exits.

Ex: if the user enters: 2.5 4 *
the program will output: 2.5 * 4

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 21:30
Nathan wants to create multiple worksheet containing common formatting styles for his team members. which file extension him to save these worksheets? nathan to create multiple worksheets with common styles. he needs to save them with the extension.
Answers: 1
question
Computers and Technology, 24.06.2019 12:30
Why does the pc send out a broadcast arp prior to sending the first ping request
Answers: 1
question
Computers and Technology, 24.06.2019 17:00
The length of time that a slide appears before automatically advancing to the next slide can be set in the timing group under the transitions tab. transition to this slide group under the transitions tab. timing group in the master slide view. transition to this slide group in the master slide view.
Answers: 1
question
Computers and Technology, 24.06.2019 17:30
What is the next step if your volume does not work on computer
Answers: 2
You know the right answer?
You MUST use switch statement to complete the following. Write a program to achieve a four-functio...
Questions
question
English, 25.04.2020 04:52
question
Mathematics, 25.04.2020 04:53
Questions on the website: 13722363