void dectobin(int n)
{
int sum = 0;
int y, x = 1;
while (n != 0)
{
y = n % 2;
sum += x * y;
x *= 10;
n /= 2;
}
printf("%d", sum);
}
06-06
3万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-05
9万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)