title: VB programming. Integer array and prime numbers
body: <p>I'm new to programming and stack overflow blogs, so hopefully I am following the 'do's and dont's' properly.</p>
  
  <p>I have been given an assignment question asking me to store 5 integers in an array and to determine if they are a prime number or not. </p>
  
  <p>The questions I have are as follows:</p>
  
  <ol>
  <li><p>How do I store them into an integer array?</p></li>
  <li><p>How do I make my program divide every input by every number less than the input?</p></li>
  </ol>
  
  <p>The code I have written so far is this:</p>
  
  <p>Sub Main()</p>
  
  <pre><code>    Dim a, b, c, d, e As Integer
      Dim isPrime As Boolean = True
  
      Console.WriteLine("Please enter a value for a: ")
      a = Console.ReadLine
      Console.WriteLine("Please enter a value for b: ")
      b = Console.ReadLine
      Console.WriteLine("Please enter a value for c: ")
      c = Console.ReadLine
      Console.WriteLine("Please enter a value for d: ")
      d = Console.ReadLine
      Console.WriteLine("Please enter a value for e: ")
      e = Console.ReadLine
  
  
  
      If a Mod (a - 1) &gt; 0 Or a = 2 And a &lt;&gt; 0 Then
          Console.WriteLine("a is a prime number")
      ElseIf a Mod (a - 1) = 0 Then
          Console.WriteLine("a is not a prime number")
      End If
  
      If b Mod (b - 1) &gt; 0 Or b = 2 And b &lt;&gt; 0 Then
          Console.WriteLine("b is a prime number")
      ElseIf b Mod (b - 1) = 0 Then
          Console.WriteLine("b is not a prime number")
      End If
  
      If c Mod (c - 1) &gt; 0 Or c = 2 And c &lt;&gt; 0 Then
          Console.WriteLine("c is a prime number")
      ElseIf c Mod (c - 1) = 0 Then
          Console.WriteLine("c is not a prime number")
      End If
  
      If d Mod (d - 1) &gt; 0 Or d = 2 And d &lt;&gt; 0 Then
          Console.WriteLine("d is a prime number")
      ElseIf d Mod (d - 1) = 0 Then
          Console.WriteLine("d is not a prime number")
      End If
  
      If e Mod (e - 1) &gt; 0 Or e = 2 And e &lt;&gt; 0 Then
          Console.WriteLine("e is a prime number")
      ElseIf e Mod (e - 1) = 0 Then
          Console.WriteLine("e is not a prime number")
      End If
  
      Console.ReadKey()
  End Sub
  </code></pre>
  
  <p>Learning all of this stuff with the prior knowledge provided has made things difficult, so any help would be greatly appreciated!</p>