/***************************************************************** * SimpleCalculator by Dustin Luca * file: CalcDriver.cpp * * Something I LOVE doing in programming is screwing with the * assignment in any and all ways possible. I didn't like * how it simply used two values and did the math. So, to solve * this issue, I created a new function (DoTheMath) that did the * math and printed the four functions automatically...from there, * I have it use A as 10 and B as 20, since the assignment demands * it, then I give the user an opportunity to use his or her own * values if he or she wants, and then it just uses the function * again, except with those values. * *****************************************************************/ #include using std::cin; using std::cout; using std::endl; #include "SimpleCalculator.h" int main() { double a = 10.0; double b = 20.0; SimpleCalculator calc; //Prints values cout << "Default values in place..." << endl; cout << "Value A initialized to " << a << endl << "Value B initialized to " << b << endl << "----------------------------------\n"; //Default one! calc.DoTheMath(a,b); //Enter your own values cout << endl << "----------------------------------\nNow it is your turn. \nEnter value A: "; cin >> a; cout << "Enter value B: "; cin >> b; cout << "----------------------------------\n"; //Run it with new values calc.DoTheMath(a,b); //Since I'm all about appearance...how about ending the line! cout << "\n----------------------------------\n"; //What the crap does this do? exit(1); // cout << addition << endl << subtraction << endl << multiplication << endl << division; }