#include <stdio.h> int main() { int x,y; x = 10; y = -3; printf("x+y=%d\n", (x)+y ); printf("x-y=%d\n", (x)-y ); printf("x*y=%d\n", (x)*y ); printf("x/y=%d\n", (x)/y ); printf("x%%y=%d\n", (x)%y ); return 0; }
后面的x不用括号括起来,"x%%y"应该是“x%y”