asmaamasto
20.03.2022 •
Computers and Technology
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
Solved
Show answers
More tips
- F Family and Home How to Properly Fold Napkins in a Napkin Holder?...
- A Auto and Moto What is the Average Lifespan of an Engine in a Car?...
- P Photography and Videography Understanding HDR: How It Works and Why You Need It...
- P Photography and Videography How to Choose the Perfect Photo Paper for Your Images?...
- C Computers and Internet How to Choose an Uninterruptible Power Supply (UPS) for Your Computer: Expert Tips...
- S Science and Technology How to choose a home theater system?...
- A Auto and Moto How to Choose a Car Wash? Tips and Recommendations...
- A Animals and plants How ants survive winter: exploring the secrets of their winter life...
- C Construction and repair How to Choose the Best Underfloor Heating?...
- S Sport When is the Champions League final?...
Answers on questions: Computers and Technology
- C Computers and Technology Which keyboard shortcut can you use to paste data into a cell? a. ctrl + c; command + cb. ctrl + x; command + xc. ctrl + v; command + vd. esc key...
- C Computers and Technology How do it security workers business...
- C Computers and Technology When paraphrasing or summarizing, you should also give credit to the original source. true or false...
- C Computers and Technology What is human data, a: your address, telephone number, email accountb: facial expressions, tone of voice energy levelc: percentage of apples sold at walmartd: color...
- C Computers and Technology The command was developed by nicholas harbour of the defense computer forensics laboratory....
- C Computers and Technology Organic farming grows more food than chemical farming true or false?...
- C Computers and Technology Which are correct representations of the inequality 6x [tex] \geqslant [/tex]3 + 4(2x - 1)? check all that apply....
- C Computers and Technology What would display if the following pseudocode was coded and executed? declare string user = martha and george declare integer number set number = length(user) display...
- C Computers and Technology Electricity from has enough energy to stop your what?...
- C Computers and Technology The national highway system improved economic activity in georgia by enabling georgia to develop an agricultural economy. people from other states avoid driving through...
Ответ:
シ㋛ت☺︎︎☻︎☯︎︎☕︎︎✈︎︎ᴥ︎︎