很简单啊:
#include "stdio.h"
#include
int main(void)
{
int A,B,C;
float D;
char ch,ch1;
A=0;
B=1;
start:
printf("请输入整数表达式:");
scanf("%d%c%d%c",&A,&ch,&B,&ch1);
switch(ch)
{
case '+':
C=A+B;
break;
case '-':
C=A-B;
printf("%d-%d=%d\n",A,B,C);
break;
case '*':
C=A*B;
printf("%d*%d=%d\n",A,B,C);
break;
case 'A':
goto EXIT;
case 'C':
system("cls");
default:
printf("输入表达式错误或该计算器不具备\" %ch \"功能\n",ch);
}
goto start;
EXIT:
fclose(fp);
return 0;
}