mirror of
https://github.com/renbaoshuo/202401-programming-assignments.git
synced 2024-11-23 15:48:42 +00:00
9 lines
184 B
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);
|
|
}
|