#include<stdio.h>
main()
{double a,b;
double result:
char operator;
printf("Pleasr input two number:");
scanf("%f,%f",&a,&b);
printf("please input the operator:");
scanf(%c",&operator);
if(opreator=='+')
printf("result=%d\n",a+b);
else if(opreator=='-')
printf("result=%d\n",a-b);
else if(opreator=='*')
printf("result=%d\n",a*b);
else if(opreator=='/')
printf("result=%d\n",a/b);
else printf("Wrong!");
getch();
}
温馨提示:内容为网友见解,仅供参考