RVBTCC/test/add.c
2024-12-08 11:40:47 +08:00

19 lines
535 B
C

int printf(char* format, ...);
int scanf(char* format, ...);
int main() {
int a;
int b;
scanf("%d", &a);
scanf("%d", &b);
printf("%d+%d=%d\n", a, b, a + b);
printf("%d-%d=%d\n", a, b, a - b);
printf("%d*%d=%d\n", a, b, a * b);
printf("%d/%d=%d\n", a, b, a / b);
printf("%d%%%d=%d\n", a, b, a % b);
printf("%d&%d=%d\n", a, b, a & b);
printf("%d|%d=%d\n", a, b, a | b);
printf("%d^%d=%d\n", a, b, a ^ b);
printf("%d<<%d=%d\n", a, b, a << b);
printf("%d>>%d=%d\n", a, b, a >> b);
}