#include<stdio.h>
int main(void)
{
float a, b, d;
printf("请输入2个浮点数:\n");
scanf("%f,%f", &a, &b);
printf("请输入一个运算符,必须是+,-,*,\n");
char c;
switch (getchar())
{
case '+':d = a + b; break;
case '-':d = a - b; break;
case '*':d = a*b; break;
case '/':d = a / b; break;
default:printf("Wrong Operator!\n");break;
}
printf("d=%f\n", d);
return 0;
}