#include<stdio.h> main() { int a,b,c,d; printf("Input a&b\n"); scanf("%d%d\n",&a,&b); 把换行符去掉 c=a/b; d=a%b; printf("商是%d\n",c); printf("余是%d\n",d); }
#include<stdio.h> main() { int a,b,c,d; printf("Input a&b\n"); scanf("%d%d\n",&a,&b); //把换行符去掉 c=a/b; d=a%b; printf("\n商是%d\n",c); //换行加在这里 printf("余是%d\n",d);