(Blanked the page)
 
Line 1: Line 1:
<syntaxhighlight lang="c">
+
 
#include<stdio.h>
+
void main()
+
{
+
int num,rem,cnt=0;
+
printf("\n Enter number");
+
scanf("%d",&num);
+
while(num>0)
+
{
+
rem=num%2;
+
num=num/2;
+
if(rem==1)
+
{
+
cnt++;
+
}
+
}
+
printf("%d",cnt);
+
}
+
+
</syntaxhighlight>
+

Latest revision as of 19:40, 18 October 2013