i am writing a program and i need help with it please. the program is:
write a simple calculator. each valid command for this calculator should consist of an operation followed by an operand. this is an accumulator-based calculator, meaning, each arithmetic operator only takes a single number. the original accumulator value is 0 and every successive operation will be on this value.the calculator should display the accumulator value after each operation.
using these keys: + add, - subtract, * multiply,
/divide, ^ power, q quit
i want the results to come out like this:
+5
result so far is 5.0
^2
result so far is 25.0
/ 2
result so far is 12.5
q 0
final result is 12.5
*********ARRAYS CANNOT BE USED IN THIS PROGRAM*************
write a simple calculator. each valid command for this calculator should consist of an operation followed by an operand. this is an accumulator-based calculator, meaning, each arithmetic operator only takes a single number. the original accumulator value is 0 and every successive operation will be on this value.the calculator should display the accumulator value after each operation.
using these keys: + add, - subtract, * multiply,
/divide, ^ power, q quit
i want the results to come out like this:
+5
result so far is 5.0
^2
result so far is 25.0
/ 2
result so far is 12.5
q 0
final result is 12.5
*********ARRAYS CANNOT BE USED IN THIS PROGRAM*************