title: After I verify number of digits is equal to 5,I want back unchanged n value
body: <p>I want to verify whether entered number has 5 digit or not so I use while loop for this.</p>
  <pre><code>while(n&gt;=10)
  {
      n = n/10;
      count++;
  }
  if(count != 5)
      return 0;
  </code></pre>
  <p>But next parts of my code are using updated n value and I don't want that.How can I say &quot;use first n value&quot; to my code?Here is all my code(It works smoothly when I delete configuration part):</p>
  <pre class="lang-c prettyprint-override"><code>#include &lt;stdio.h&gt;
  int main(void)
  {
      int digit=0,n,count=0;
      scanf(&quot;%d&quot;,&amp;n);
      while(n&gt;=10)
      {
          n = n/10;
          count++;
      }
      if(count != 5)
          return 0;
      for(int i=0; i&lt;5; i++)
      {
          digit += n%10;
          n /= 10;
      }
      printf(&quot;%d&quot;,digit);     
  }
  </code></pre>