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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started