找不出错误,运行就出错,求助!
#include<stdio.h>int main (void)
{
float a,b;
char c;
scanf("%f %f %c",&a,&b,&c);
if((c=='/')&&(b==0))
printf("除数为0!");
if((c=='+')||(c=='-')||(c=='*')||(c=='/'))
switch(c)
{
case'+':printf("%f",a+b);break;
case'-':printf("%f",a-b);break;
case'*':printf("%f",a*b);break;
case'/':printf("%f",a/b);break;
}
else
printf("运算符号错误!");
return 0;
}