#include<stdio.h>
int main()
{
int num = 0;
int i = 0;
int count = 0;
scanf("%d",&num);
for(i = 0;i<32;i++)
{
if(((num>>i) & 1) == 1)
{
count++;
}
}
printf("%d\n",count);
return 0;
}
连我都会了,不可思议
标签:count,return,int,补码,中有,num,main,统计
来源: https://blog.csdn.net/qq_61557294/article/details/120404300