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 19:20
How might the success of your campaign be affected if you haven’t carefully completed all field data or if you accidentally insert the wrong merge field in the document?
Answers: 2
question
Computers and Technology, 23.06.2019 18:00
What can a word user do with the customize ribbon dialog box? check all that apply. minimize the ribbon add a new tab to the ribbon remove a group from a tab add a group to a tab choose which styles appear choose which fonts appear choose tools to appear in a group
Answers: 1
question
Computers and Technology, 24.06.2019 03:40
4. does the kernel phenotype distribution support the idea that the cob is the result of a dihybrid cross? what information supports your answer? if a dihybrid cross (i.e. f1 to f2 of standard mendelian crosses) is not indicated what conditions might contribute to this finding.
Answers: 2
question
Computers and Technology, 24.06.2019 13:00
Refer to the figure and match the theorem that supports the statement.1.if chords are =, then arcs are =.if bc = de, then arc bc = arc de2.if arcs are =, then chords are =.if arc bc = arc de, then bc = de3.diameters perpen
Answers: 3
You know the right answer?
You MUST use switch statement to complete the following. Write a program to achieve a four-functio...
Questions
question
Geography, 12.12.2020 16:20
question
Mathematics, 12.12.2020 16:20
question
Mathematics, 12.12.2020 16:20
question
Mathematics, 12.12.2020 16:20
question
History, 12.12.2020 16:20
question
Mathematics, 12.12.2020 16:20
Questions on the website: 13722363