C语言:输入两个数和一个字符,根据操作符进行加减乘除运算,并输出...答:include <stdio.h> int main(){ int a, b; //两个数 char op; //操作符 printf("输入一个表达式,例如5*4:\n");scanf("%d%c%d", &a, &op, &b);switch(op){ case '+':printf("%d%c%d=%d", a, op, b, a+b);break;case '-':printf("%d%c%d=%d", a, op,...
谁能帮我编写一个C语言实现负数加减乘除的程序啊。要对的答:include<stdio.h> include<conio.h> void main(){ while(1){ int a=0,b=0,c=0,result,key;char d;printf("输入两个整数:\n");scanf("%d",&a);scanf("%d",&b);printf("选择算法 '+','-','*','/' \n");scanf(" %c",&d);printf("输入计算结果:\n");scanf("%d",&...
请帮忙用C语言设计一个简单的计算器、可以加减乘除,输出结果为“A+B=...答:int main(){ float x,y,z;char c;printf("请输入x,y的值:");scanf("%f %f",&x,&y);printf("请输入操作符:");scanf("%c",&c);switch(c){ case ‘+’: printf("x+y=%f",x+y);break;case '-': printf("x-y=%f",x-y);break;case '*': printf("x*y=%f",x*...