title: How to include average of digits in number in my code?
body: <p>I don't understand how to include average of digits in my code </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main()
  {
      int n, s;
      printf("Enter number : ");
      scanf("%d",&amp;n);
      s = 0;
      while (n &gt; 0)  {
          s += n%10;
          n /= 10;
      }
      printf("Sum of digit : %d\n",s);
      return 0;
  }
  </code></pre>