二十五岁时我们都一样愚蠢、多愁善感,喜欢故弄玄虚,可如果不那样的话,五十岁时也就不会如此明智。
标题:C库函数 - div()
C库函数 - div()
#include <stdio.h> #include <stdlib.h> int main () { div_t output; output = div(27, 4); printf("Quotient part of (27/ 4) = %d\n", output.quot); printf("Remainder part of (27/4) = %d\n", output.rem); output = div(27, 3); printf("Quotient part of (27/ 3) = %d\n", output.quot); printf("Remainder part of (27/3) = %d\n", output.rem); return(0); }