help me in c++ calculator
so my problem is I have to make a simple program that will take the users desired arithmetic operation to be used and ask the user how many input he/she want to enter, So the first three operation is quite a bit easy but the division make me sick. can anyone help me? this is my codes by the way #include <iostream> using namespace std; int main() { int sum,diff,prod = 1,range,StartNum; char UseOperation; double num = 1,quo =1; cout << "Enter Operation to be used : " << endl; cout << "(a)Addition" << endl << "(b)Subtraction" << endl << "(c)Multiplication" << endl << "(d)Division" << endl; cin >> UseOperation; cout << "Enter how many number you want to input : " << endl; cin >> range; if (UseOperation == 'a'){ for (StartNum = 0;StartNum < range;range --){ cout << "Enter Number : " << endl; cin >> num; num += num; } sum = num; cout << "The sum of the inputed number is " << sum << endl; } else if (UseOperation == 'b'){ for (StartNum = 0;StartNum < range;range --){ cout << "Enter Number : " << endl; cin >> num; num -= num; } diff = num; cout << "The difference of the inputed number is " << diff << endl; } else if (UseOperation == 'c'){ for (StartNum = 0;StartNum < range;range --){ cout << "Enter Number : " << endl; cin >> num; prod *= num; } prod = prod; cout << "The product of the inputed number is " << prod << endl; } else if (UseOperation == 'd'){ for (StartNum = 0;StartNum < range;range --){ cout << "Enter Number : " << endl; cin >> num; num /= num; } quo = num; cout << "The quotient of the inputed number is " << quo << endl; } else{ cout << "Error" << endl; } return 0; system("pause"); }