title: Reset the value after a loop ends
body: <p>I want <code>n</code> to be reset to its first value entered by user.</p>
  
  <p>For example I enter 3 and program wants me to enter 3 numbers to be added up. However when <code>n</code> is iterated by the end of for loop it is set to zero. </p>
  
  <p>When I print <code>n</code> out I want it to be seen as 3 which is original value given by user. As it stays 0 I also can't find the average of these numbers since sum / 0 is unknown.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main(){
      int sum=0;
      int n;
      int entered=0;
      printf("How many numbers to be summed up:");
      scanf("%d",&amp;n);
      for(;n&gt;0;n--){
          printf("Enter the number to be summed up:");
          scanf("%d",&amp;entered);
          sum+= entered;
      }
      printf("Number of Entries:%d\nSum of the Entered numbers:%d",n,sum);
      printf("Average:%d",sum/n);
      return 0;
  }
  </code></pre>