I can't figure out the problem in this:
#include<stdio.h>
int main()
{
int a,b,count ;
count =0;
printf("enter the value for a ");
scanf("%d ",&a);
while(a>0)
{
b=a%10;
count=b+count;
a=a/10;
printf ("hence the simplified result is %d",count);
}
return 0;
}