Question: I have written five functions that will add,subtract,divided,multiply,and modulus. now i need to know how to Write a function called evaluate, that does not take

I have written five functions that will add,subtract,divided,multiply,and modulus. now i need to know how to Write a function called evaluate, that does not take any arguments and does not return a value. This method will read in an arbitrary number of values from the user: an integer followed by a character that denotes an operation. Once you have the number and the operation, call the appropriate function from the five that you just wrote to keep a running evaluated total. The user input ends when the character entered is a ?. When the user is done with input, print the result.

example)

Enter the expression: 1 + 26 
* 2 % 19 / 5 ? The result is 3 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!