c语言写四则运算...输入一个等式。。。再输入结果。。。判断正误...答: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",&result);switch(d){ case'+': c=a...
输入两个整数,进行加减乘除四则运算的c语言程序怎么写啊,拜托了~_百 ...答:include<stdio.h> int main() {int a,b,sum,sub,mul,div;scanf("%d%d",&a,&b);sum=a+b;sub=a-b;mul=a*b;div=a/b;printf("%d\n%d\n%d\n%d\n",sum,sub,mul,div);return 0; }
输入两个整数,进行加减乘除四则运算的c语言程序怎么写啊,拜托了~_百 ...答:void function(int a, int b){ printf("%d add %d = %d\n",a, b, a+b); //加法运算 printf("%d sub %d = %d\n",a, b, a-b);//加法运算 printf("%d mul %d = %d\n",a, b, a*b);//乘法运算 printf("%d div %d = %d\n",a, b, a/b);//除法运算 } int ...