title: program to find the sum of digits
body: <p>I can't figure out the problem in this:</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  int main()
  {
      int a,b,count ;
      count =0;
      printf("enter the value for a ");
      scanf("%d ",&amp;a);
      while(a&gt;0)
      {
          b=a%10;
          count=b+count;
          a=a/10; 
  
          printf ("hence the simplified result is %d",count);
      }
      return 0;
  }
  </code></pre>