编个简易计算器,不知道哪里错了啊···求大虾们打救
#include <math.h>main()
{float a1,a2,answer;char op;
scanf("%f",%f,%c",&a1,&a2,&op);
switch(op)
{ case "+":answer=a1+a2;break;
case "-":answer=a1-a2;break;
case "*":answer=a1*a2;break;
case "/":answer=a1/a2;break;
default:printf("OP Input ERROR!");
}
printf("Answer is %f\n",answer);
}