//Eric Johnson //Simple Calculator //03-27-12 #include #include #include "calc_func.hpp" #include "clear.hpp" using namespace std; int main() { char operation; double a, b, answer; cout << "Please input the first operand: "; cin >> a; clear(); cout << "Please input the second operand: "; cin >> b; clear(); cout << "Please input the operation you wish to perform: " cin >> operation switch (operation) { case (a): add(); break; case (m): multiply(); break; case (d): divide(); break; case (s): subtract(); break; case (p): AtoB(); break; case (r): BtoA(); break; } cout << "\nThese are you operands: " << a << "&: " << b << endl; cout << "This is the answer to your problems: " << answer << endl; }