title: How to check for prime numbers
body: <p>The following code lists all prime numbers from 1 to 10:</p>
  
  <pre><code>Dim primeN As Integer 
  Dim primeI As Integer
  Dim primeFlag As Boolean
  
  For primeN = 1 To 10
      primeFlag = True
      For primeI = 2 To primeN / 2
         If primeN Mod primeI = 0 Then
           primeFlag = False
         End If
      Next
      If primeFlag Then
         Console.WriteLine(primeN)
      End If
  Next
  Console.ReadLine()
  </code></pre>
  
  <p>How can I change it so that it reads the user input and then checks if it's a prime number?</p>