// Program to perform given operation on two input integers
#include<iostream.h> {
void main()
{
int a, b, c, d, e;
char oper;
float f;
cout<<"Enter the first number:";
cin>>a;
cout<<"Enter the operator:";
cin>>oper;
cout<<"Enter the second number:";
cin>>b;
if (oper=='+')
{
c = a +b;
cout <<"the result is:"<<c;
else if(oper=='-')
{
d=a-b; cout<<"the result is:"<<d;
} else if (oper=='*') {
e = a*b; cout<<"the result is:"<<e;
} else if (oper=='/')
if (b==0)
{
} else
{
f=(float)a/b;
cout<<"the result is : "<<f;
}
}
else
cout<<"invalid operator";
}