Why is the if Statement does not work?
#include <iostream> using namespace std; int main() { int m; int n=1; int o=2; int p=3; int q=4; cout<<"Type:"<<endl<<endl; cout<<"1 to sum"<<endl<<endl; cout<<"2 to subtract"<<endl<<endl; cout<<"3 to multiplicate"<<endl<<endl; cout<<"4 to divide"<<endl<<endl; cin>>m; if (m==n); { //addiction cout << "Addiction" << endl; int a; cout << "Enter the first number"<<endl; cin >> a; int b; cout << "Enter the second Number"<<endl; cin >> b; int c=a+b; cout <<"Acording to Kevin the result is:"<<c<<endl<<endl; } //addiction if (m==o); { //subtraction cout << "Subtraction"<<endl; int d; cout <<"Enter First number"<<endl; cin >>d; int e; cout <<"Enter second number"<<endl; cin >> e; int f=d-e; cout << "The result is:"<<f<<endl<<endl; } //subtraction if (m==p); { //Multiplication cout << "Multiplication"<<endl; int g; cout <<"Enter First number"<<endl; cin >>g; int h; cout <<"Enter second number"<<endl; cin >> h; int i=g*h; cout << "The result is:"<<i<<endl<<endl; } //Multiplication if (m==q); { //Division cout << "Division"<<endl; int k; cout <<"Enter First number"<<endl; cin >>k; int l; cout <<"Enter second number"<<endl; cin >> l; int j=k/l; cout << "The result is:"<<j<<endl; //Division return 0; } } This is my attempt to make a calculator.Now as you see in the first cout, I programed to the user put a number and, hopefully it will take you to the desired code. Example: If you write 1, It will take you to the addiction part If you write 2, It will take you to the subtraction part. But it is not working out.It always shows me the addiction part independently the number I put.Please Help me Sorting out the Problem.