新手,帮忙看一下哪错了
就简单的四则运算,我看了半天没看出哪错了(ps:流感使我无法外出痛苦的我)#include <stdio.h>
void main()
{
double a,b;
char c;
printf("input expression:a+(-,*,/)b\n");
scanf("%f%c%f",&a,&c,&b);
switch(c)
{
case'+':printf("%lf\n",a+b);break;
case'-':printf("%lf\n",a-b);break;
case'*':printf("%lf\n",a*b);break;
case'/':printf("%lf\n",a/b);break;
default:printf("input error\n");
}
}