char op;
int num1,num2;
printf("Enter the operation:");
scanf("%c",&op);
printf("Enter the first number:");
scanf("%D",&num1);
printf("Enter the second number:");
scanf("%D",&num2);
if(op == '+')
printf("%d",num1+num2);
if(op == "-")
printf("%d",num1-num2);
上面的回答不错