取模符号的±——看被取模数的± 可以理解成取余的优先级比±高 -a%b 其实是 -(a%b) #include <stdio.h> int main() { printf("%d\n",-3%6); printf("%d\n",3%-6); return 0; } 结果———— -3 3