Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- #include "evaluate.h"
- int main()
- {
- char userInput[80];
- cout << atoi("1+E5") << endl;
- cout << "Evaluation of 22 + 3 * 4:" << endl;
- evaluate("22+3*4"); // Output of evaluation is included in evaluate
- cout << "(2+3) * 4 = " << evaluate(" (2+3) * 4") << endl;
- cout << endl << "Try one yourself: ";
- cin.getline(userInput,80);
- cout << userInput << " = " << evaluate(userInput) << endl;
- cout << endl << "Try another: ";
- cin.getline(userInput,80);
- cout << userInput << " = " << evaluate(userInput) << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment