Beginners C

#include
#include
void main()
{
int n,x,a,b,s;
clrscr();
a=0;b=0;
printf("enter the binary no:");
scanf("%d",&n);
s=n;
while(n>0)
{
x=n%10;
n=n/10;
if(x==0)
a++;
else if(x==1)
b++;
}
printf("
the number is:%d",s);
printf("
the ones are:%d",b);
printf("
the zeros are:%d",a);
getch();
}