### Basic Fully Functional Calculator

For all beginners and 12-year olds out there (just like me, 12 years old)...
I just developed this simple calculator, which adds, subtracts, multiplies and divides.

 ``123456789101112131415161718192021222324252627282930313233343536373839404142`` ``````#include #include using namespace std; int main(){ double num1; double num2; double answer; string choice; cout << "What operation do you want?" << endl; cout << "Just type: ADD, SUBTRACT, MULTIPLY or DIVIDE in all caps!" << endl << endl; cin >> choice; system("cls"); cout << "Enter a number: "; cin >> num1; cout << "Enter another number: "; cin >> num2; cout << endl << endl; if(choice=="ADD"){ answer = num1 + num2; cout << "The sum is: " << answer << endl; system("pause"); return 0; } if(choice=="SUBTRACT"){ answer = num1 - num2; cout << "The difference is: " << answer << endl; system("pause"); return 0; } if(choice=="MULTIPLY"){ answer = num1 * num2; cout << "The product is: " << answer << endl; system("pause"); return 0; } if(choice=="DIVIDE"){ answer = num1 / num2; cout << "The quotient is: " << answer << endl; system("pause"); return 0; } }``````

Hope you all guys like it!
Very basic, but a good program for beginners. I feel like we all made that exact program at one point!
hmmm good.
very basic but you are only 12 years old so this is very good program.
keep it up
closed account (zb0S216C)
omeraslam wrote:
"you are only 12 years old so this is very good program."

As I've said before, age has nothing to do with it. And because he/she's young, it's automatically a good program? I'm not knocking xcalibur0645 or his/her code; I'm just saying.

Wazzak
^^ Shouldn't he be programming for a droid or something? :)
Topic archived. No new replies allowed.