C语言程序编写“输入两个整数,分别求他们的和、差、积、商、余数,并...答:前面声明变量的时候类型是浮点型,所以格式符应该使用%f而不是%d,%d是整型。改为:include "stdio.h"void main(){ float x,y,a,b,c,d;scanf("%f%f,&x,&y);printf("%f%f%f",x+y,x-y,x*y,x/y,x%d);}
c语言程序设计. 由键盘输入两个整数,分别计算这两个数的和、差、积...答:include "stdio.h"main(){ int a,b;printf("请输入两个整数(a,b):");scanf("%d,%d",&a,&b);printf("和:%d\n",a+b);printf("差:%d\n",a-b);printf("积:%d\n",a*b);printf("商:%f\n",(float)a/b);}