### Calculator

So i made this calculator program using some functions.
I'm still very new to C++, and programming in general, but i think the code shows some useful things.

 ``123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136`` ``````#include #include #include using namespace std; //Function Prototypes //Addition void add (float number1, float number2) { cout << "total - " << number1 + number2 << endl << endl; } //Subtraction void subtract (float number1, float number2) { cout << "total - " << number1 - number2 << endl << endl; } //Multiplication void multiply (float number1, float number2) { cout << "total - " << number1 * number2 << endl << endl; } //Division void divide (float number1, float number2) { cout << "total - " << number1 / number2 << endl << endl; } //Powers void power (float number1, float number2) { cout << "total - " << pow (number1, number2) <> menu; //Addition if (menu == 1) { cout << "Enter a number " << endl; cin >> num1; cout << "Enter the number you would like to add " << endl; cin >> num2; add (num1, num2); } //Subtraction if (menu == 2) { cout << "Enter a number " << endl; cin >> num1; cout << "Enter the number you would like to subtract " << endl; cin >> num2; subtract (num1, num2); } if (menu == 3) //Multiplication { cout << "Enter a number " << endl; cin >> num1; cout << "Enter the number you would like to multiply " << endl; cin >> num2; multiply (num1, num2); } //Division if (menu ==4) { cout << "Enter a number " << endl; cin >> num1; cout << "Enter the number you would like to divide " << endl; cin >> num2; divide (num1, num2); } //Powers if (menu == 5) { cout << "Enter a number " << endl; cin >> num1; cout << "to the power of "; cin >> num2; power (num1, num2); } //Square Root if (menu == 6) { cout << "Enter a number " << endl; cin >> num1; cout << "Square root - " << sqrt (num1) << endl << endl; } //Fractions if (menu == 7) { cout << "Enter a number " << endl; cin >> num1; cout << "one half - " << num1/2 << endl; cout << "one 3rd - " << num1/3 << endl; cout << "one 4th - " << num1/4 << endl; cout << "one 5th - " << num1/5 << endl; cout << "one 6th - " << num1/6 << endl; cout << "one 7th - "<< num1/7 << endl; cout << "one 8th - " << num1/8 << endl; cout << "one 9th - " << num1/9 << endl; cout << "one 10th - " << num1/10 << endl; cout << "one 15th - " << num1/15 << endl; cout << "one 16th - " << num1/16 << endl; cout << "one 17th - " << num1/17 << endl; cout << "one 18th - " << num1/18 << endl; cout << "one 19th - " << num1/19 << endl; cout << "one 20th - " << num1/20 << endl; cout << "one 32nd - " << num1/32 << endl << endl; } //Square and Cube if (menu == 8) { cout << "Enter a number " << endl; cin >> num1; cout << "Squared " << pow (num1, 2) << endl; cout << "Cubed " << pow (num1, 3) << endl << endl; } if (menu == 9) { return 0; } main(); }``````