1
0
mirror of https://github.com/renbaoshuo/202401-programming-assignments.git synced 2024-11-27 02:25:37 +00:00
202401-programming-assignments/【实践课内】11.函数2/6-3 十进制转换二进制.c

9 lines
184 B
C

int _dectobin_call_count = 0;
void dectobin(int n) {
if (n == 0 && _dectobin_call_count != 0) return;
_dectobin_call_count++;
dectobin(n >> 1);
printf("%d", n & 1);
}