#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;
}
两个%%在printf函数中才能输出%号,若只输入一个%会被计算机误认为是分隔符