标签:
#include<stdio.h>
main()
{
float a,b;
char c;
printf("输入表达式如a+(* - /)b:\n");
scanf("%f%c%f",&a,&c,&b);
switch(c)
{
case‘+‘:printf("%f\n",a+b);break;
case‘-‘:printf("%f\n",a-b);break;
case‘*‘:printf("%f\n",a*b);break;
case‘/‘:printf("%f\n",a/b);break;
}
return 0;
}
标签:
原文地址:http://www.cnblogs.com/lj-1568/p/4387254.html