// this program performs addition, subtraction, multiplication and subtraction.
#include<iostream.h>
void main(){
float x=0,y=0,result=0;
char o;
cout<<"input the operation like this fuger (1+2)\n\n";
cin>>x>>o>>y;
switch (o){
case '+':result=x+y;
break;
case '-':result=x-y;
break;
case '*':result=x*y;
break ;
case '/':result=x/y;
break ;
default:cout<<"the operation not defind\n";}
cout<<"The result is = "<<result<<"\n\n";
}
1- where is using namespace std;
2- if i wanna calculate this : 1+2+3 , in your calculator the result is : 3 , it can just calculate the two first number .