You are on page 1of 1

#include <iostream>

using namespace std;

int main()
{ int a,b,ch;
cout<<"enter two nos"<<endl;
cin>>a>>b;
cout<<"arithemetic operators"<<endl;
cout<<"press 1 for addition"<<endl;
cout<<"press 2 for subtraction"<<endl;
cout<<"press 3 for multiplication"<<endl;
cout<<"press 4 for division"<<endl;
cout<<"enter your choice"<<endl;
cin>>ch;
switch(ch)
{
case 1: cout<<"addition="<<a+b;
break;
case 2: cout<<"subtraction="<<a-b;
break;
case 3: cout<<"multiplication="<<a*b;
break;
case 4: cout<<"division="<<a/b;
break;
default : cout<<"wrong choice";
}
return 0;
}

You might also like