#include<iostream>
using namespace std;
int main()
{
char opera;
int a,b;
cout<<" enter an operator +or-or*or/:";
cin>>opera;
cout<<" enter two no :";
cin>>a>>b;
switch(opera)
{
case '+':
cout<<a+b;
break;
case'-':
cout<<a-b;
break ;
case'*':
cout<<a*b;
break ;
case'/':
cout<<a/b;
break ;
default:
cout<<" Error! character is not found";
}
return 0;
}
0 Comments
कमेंट केवल पोस्ट से रिलेटेड करें