if (x % 2 == 0) printf("x is even.\n"); else printf("x is odd.\n");. 這裡的%是取模(Modulo)運算符, x%2 表示 x 除以2所得的餘數(Remainder),C語言規定%運算 ...
確定! 回上一頁