subject

3. Write a function simulating a calculator on two integer numbers. The function is going to receive a character “op” representing an operation (+,-,*,/,%,etc), “num1” and “num2”. The function is going to check that the input is valid.
If the input is not valid, the function is going to print a corresponding message to the screen and return 0. Otherwise, if the input is valid, then the function should return the result of the operation. For example:
- for op ‘+’ the function is going to return “num1+num2”.
- for op ‘-‘ the function is going to return “num1-num2”.

c++

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 24.06.2019 04:10
Write a program that reads a set of floating-point values. ask the user to enter the values, then print • the average of the values. • the smallest of the values. • the largest of the values. • the range, that is the difference between the smallest and largest. of course, you may only prompt for the values once.
Answers: 3
question
Computers and Technology, 25.06.2019 09:30
An output peripheral interacts with or sends data to the computer provides information to the user from the computer receives data from the computer and sends it to a modem stores data processed by the computer
Answers: 1
question
Computers and Technology, 25.06.2019 09:50
The mips architecture has a register set that consists of 32-bit registers. is it possible to design a computer architecture without a register set? if so, briefly describe the architecture, including the instruction set. what are advantages and disadvantages of this architecture over the mips architecture?
Answers: 3
question
Computers and Technology, 26.06.2019 03:30
Aobject is used for displaying the results of a question based on stored data. a.query b. report c. table d. form
Answers: 1
You know the right answer?
3. Write a function simulating a calculator on two integer numbers. The function is going to recei...
Questions
question
History, 10.12.2020 20:40
question
Mathematics, 10.12.2020 20:40
question
Social Studies, 10.12.2020 20:40
question
Mathematics, 10.12.2020 20:40
question
Mathematics, 10.12.2020 20:40
question
Mathematics, 10.12.2020 20:40
question
Mathematics, 10.12.2020 20:40
Questions on the website: 13722367