跪求急:高手们谁帮帮我这个菜鸟写个程序,我自学的不会。急!

2024-12-19 17:56:00
推荐回答(2个)
回答1:

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);

回答2:

上面的回答不错