輸入兩個整型變量的值存入x?
#includeintmain(){inta,b,c,d=0;scanf("%d%d",&a,&b);c=a/b;d=a%b;printf("商是:%d\n",c)
;printf("余數是:%d\n",d);return0;
}運行可用,輸入用空格分分開兩個數比如輸入:53后回車輸出:商是:1余數是:2
下一篇VBS如何獲得數組大小
輸入兩個整型變量的值存入x?
#includeintmain(){inta,b,c,d=0;scanf("%d%d",&a,&b);c=a/b;d=a%b;printf("商是:%d\n",c)
;printf("余數是:%d\n",d);return0;
}運行可用,輸入用空格分分開兩個數比如輸入:53后回車輸出:商是:1余數是:2