#include <stdio.h> int main() { int x,y; x = 10; y = -3; printf("x+y=%d\n", 7 ); printf("x-y=%d\n", 13 ); printf("x*y=%d\n", -30 ); printf("x/y=%d\n", -3 ); printf("x%%y=%d\n", x%y ); return 0; }
x%y即x模y、x%%y即打印一个%
显示一个百分号,让那个输出的样子是x%y.