RVBTCC/test/operator/assign.c
2024-12-24 16:16:03 +08:00

28 lines
462 B
C

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