0
I have this question. My code is not giving the right output.
Write a basic calculator program. The program input and output should be as indicated below; Sample Input Enter the first operand: 10 Enter the arithmetic symbol: * Enter the second operand: 20 Sample Output: 10 * 20 = 200 Another Operation, Y/N? The program should allow the user to input arithmetic operators such as *, -, +, and /. If the user inputs an arithmetic symbol that is not defined then the following error message, “Error, Wrong Operator. Use defined operators *, -, +, and /.”. The program should consist of the following; class simple_calc, member variables, and member functions such as f_add(), f_sub(), f_mult(), f_div(), f_inputs(), f_outputs(), etc.
4 Respostas
+ 5
Collins Maina ,
what kind of trouble do you have with this description?
> did you made any try that you can link here?
> we are also missing the programming language you are going to use.
+ 1
switch statements select pieces of code depending on a value. Think if you have to select member functions from main routine or select something in each member function.
0
Am using c++
0
For each function do you have to use a switch case or should you only have one switch case for the whole program