#include
double calculetor (double a,double b,char myoperator)
{
if (myoperator =='+')
{
return a+b;
}
else if (myoperator =='-')
{
return a-b;
}
else if (myoperator =='*')
{
return a*b;
}
else if (myoperator =='/')
if(b=0)
{
printf ("除数不能为零!!!!\n");
return 0;
}
else
{
return a/b;
}
else
{
printf ("亲,这个问题太难了,我也不会算。\n");
return 0;
}
}
int main ()
{
double a,b;
char myoperator;
scanf("%lf%c%lf",&a,&myoperator,&b);
printf("%lf\n",calculetor(a,b,myoperator));
return 0;
}