- 十进制 转 二进制
void main()
{
int i=0, j =0;
int a[200] = {0};
int num = 0;
int count = 0;
scanf("%d", &num);
for(; num > 0; num/=2)
{
a[i++] = num%2;
}
for(j = i-1; j >=0; j--)
{
if(0 == a[j])
count++;
}
printf("%d", count);
return 0;
}