请给看看谢谢了
#include<stdio.h>
void main()
{
int a,b;
int he,cha,ji,yu;
float shang;
printf("\n请输入2个数值\n");
scanf("%d\n%d",&a,&b);
he=a+b;
cha=a-b;
ji=a*b;
shang=a/b;
yu=a%b;
printf("\n和为:%d\n",he);
printf("\n差为:%d\n",cha);
;
printf("\n积为:%d\n",ji);
printf("\n商为:%3.5f\n",shang);
printf("\n余为:%d\n",yu);
}
输入整数可以,如果整数和小数都可输入怎么写呢?
谢谢