#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;
}
一个%跟%d类似,这里要用两个%实现
%%要打两次才能显示出来
x+y=7
x-y=13
x*y=-30
x/y=-3
xy=1