Why is my calculator program not outputting any numbers?
I am trying to make a calculator program that will ask for what operation the user wants to perform and then input two numbers. The calculator will then perform the function and return the value to the user. The problem is, the calculator won't output any numbers. I'm confused why this is happening. Here is what I have so far: #include <iostream> using namespace std; int a = 0; int b = 0; string y; int add(int a,int b) { return (a + b); } int subtract(int a,int b) { return (a - b); } int divide(int a, int b) { return (a/b); } int multiply(int a, int b) { return (a * b); } int main() { cout << "MENU" << endl; cout << "1. Add" << endl << "2. Subtract" << endl << "3. Multiplication" << endl << "4. Division" << endl << endl; cout << "What do u want to do? (Choose one of the aforementioned options 1-4)" << endl; int x = 0; cin >> x; cout << "Alright, what numbers do you want?" << endl; cin >> a; cin >> b; switch(x) { case 1: add(a,b); break; case 2: subtract (a,b); break; case 3: multiply(a,b); break; case 4: divide (a, b); break; } }