title: I write a code in C language for a problem. why it is not showing any output?
body: <p>I got a problem while solving this C problem. I am not getting any output. How can I fix it?</p>
  
  <p>Problem:</p>
  
  <p>Limits 1s, 512 MB</p>
  
  <p>Read an integer variable and print it in which the digits are separated into groups of three by commas.</p>
  
  <p>Input</p>
  
  <p>The input will contain an integer A (0≤A&lt;2000000000).</p>
  
  <p>Output</p>
  
  <p>Print the formatted number.</p>
  
  <p>Sample</p>
  
  <p>Input:  </p>
  
  <pre><code>1171123
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>1,171,123
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  int main()
  {
      long int a[10],n;
      int i=0,j;
      scanf("%li",&amp;n);
      while(n&gt;0)
      {
          a[i]=n%1000;
          n=n/1000;
          i++;
      }
      for(j=i-1;j&lt;=0;j--)
      {
          printf("%li",a[j]);
          if(j&gt;0)
          {
              printf(",");
          }
      }
      printf("\n");
  
  
      return 0;
  }
  </code></pre>
  
  <p>I use this code. but there is no output. why ??</p>