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, 22.06.2019 09:40
Sarah is having a hard time finding a template for her advertising business that she may be able to use at a later date and also make it available to her colleagues
Answers: 1
question
Computers and Technology, 22.06.2019 21:00
Write a method so that the main() code below can be replaced by the simpler code that calls method original main(): public class calcmiles { public static void main(string [] args) { double milesperhour; double minutestraveled; double hourstraveled; double milestraveled; milesprhour = scnr.nextdouble(); minutestraveled = scnr.nextdouble(); hourstraveled = minutestraveled / 60.0; milestraveled = hourstraveled * milesperhour; system.out.println("miles: " + milestraveled); } }
Answers: 2
question
Computers and Technology, 23.06.2019 22:00
Technician a says engine assemblies can be mounted longitudinally in a chassis. technician b says engine assemblies can be mounted transversely in a chassis. who is correct?
Answers: 2
question
Computers and Technology, 24.06.2019 12:30
Why does the pc send out a broadcast arp prior
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
Mathematics, 04.01.2021 19:10
question
Mathematics, 04.01.2021 19:10
question
Mathematics, 04.01.2021 19:10
question
Mathematics, 04.01.2021 19:10
question
Mathematics, 04.01.2021 19:10
question
Mathematics, 04.01.2021 19:10
Questions on the website: 13722367