title: Change the amount of times code checks number
body: <pre><code>            Console.Write(&quot;Enter -&quot;);
              string input = Convert.ToString(Console.ReadLine());
              string ascii = input;
              byte[] ASCIIValues = Encoding.ASCII.GetBytes(ascii);
              for (int i = 0; i &lt; input.Length; i++)
              {
                  if (ASCIIValues[i] &gt;= 48 &amp;&amp; ASCIIValues[i] &lt;= 57)
                  {
                      Console.WriteLine(&quot;Is number&quot;);
                  }
                  else
                  {
                      Console.WriteLine(&quot;Is not number&quot;);
                  }
              } 
  </code></pre>
  <p>I have made a code where it checks if you have entered number or not. It works fine while using only numbers from 1 to 9 . When I enter number with more digits the code checks each number. For example I enter 100 , and the code shows 3 lines &quot;Is number.&quot;  How could I change it , to only showing 1 line of &quot;Is number.&quot;</p>