两个数的除法
#include <stdio.h>int main()
{
int dividend, divisor, quotient, remainder;
printf("输入被除数: ");
scanf("%d", ÷nd);
printf("输入除数: ");
scanf("%d", &divisor);
// 计算商
quotient = dividend / divisor; 这个为什么不用判断是否有余数,而能直接输出?
// 计算余数
remainder = dividend % divisor;
printf("商 = %d\n", quotient);
printf("余数 = %d", remainder);
return 0;
}