#include"stdio.h"
void main()
{
float a,c;
char b;
printf ("in put suanshi:\n");
scanf("%f%c%f",&a,&b,&c);
switch(b)
{
case '+':printf("%f",a+c);break;
case '-':printf("%f",a-c);break;
case '*':printf("%f",a*c);break;
case '/':printf("%f",a/c);break;
}
}
看看对不,有点罗嗦