RVBTCC/test/add.c

19 lines
535 B
C
Raw Normal View History

2024-12-07 06:13:34 +00:00
int printf(char* format, ...);
int scanf(char* format, ...);
int main() {
int a;
int b;
scanf("%d", &a);
scanf("%d", &b);
2024-12-08 03:40:47 +00:00
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);
2024-12-07 06:13:34 +00:00
}