Any two values from user which could be addition,subtraction,multiplication and division using with the help of "if else if statement"




#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
int a,b;
char choice;
cout<<"enter the value of a=";
cin>>a;
cout<<"enter the value of b=";
cin>>b;
cout<<"enter + for addition\n enter - for subtraction\n enter * for multiplication\n enter / for division\n";
cin>>choice;
if (choice=='+')
{
cout<<"add two number "<<a+b<<endl;
}
  else  if (choice=='-')
{
cout<<"sub two number "<<a-b<<endl;
}

else if (choice=='*')
{
cout<<"mul of two number "<<a*b<<endl;
}
else if (choice=='/')
{
cout<<"div of two number "<<a/b<<endl;
}
else

cout<<"invalid";

getch ();
}