title: (Beginner) Using 2 loops to determine if number is prime...doesn't work for some numbers
body: <p>I'm just gonna post the functional part of my program here (not the methods for the hello and goodbye graphics...they're fine!). Basically the program has the user input a whole number, determines if it's prime or not, and asks them if they want to do it again. It continues to run the loop until they say no.  </p>
  
  <p>Here's what I have so far.<br>
  Main:  </p>
  
  <pre><code>public static void main (String[] args)
  {
      Scanner scan = new Scanner (System.in);
  
      int n = 0, even = 2;
      int answer = 0;
      String reply;
      char doAgain = 'Y';
  
      Welcome();
  
      do
      {
      System.out.print("Enter a whole number: ");
      n = scan.nextInt();
  
      PrimeTest(n);
  
      System.out.print("Try another number? (Y/N): ");
      reply = scan.next().toUpperCase();
      doAgain = reply.charAt(0);
      System.out.println();
  
      }while(doAgain != 'N');
  
      Goodbye();
  }
  </code></pre>
  
  <p>And here's the part that isn't working, apparently--it does nothing for 3, and says 21 IS a prime number:</p>
  
  <pre><code>public static void PrimeTest(int n)
  {
      int two = 2;
  
      while(two &lt;= n / 2)
      {
          if(n % two == 0)
              {
              System.out.println(n + " is not a prime number.");
              System.out.println();
              }
          else
              {
              System.out.println(n + " is a prime number.");
              System.out.println();
              }
          break;
      }
  }
  </code></pre>
  
  <p>Any help is appreciated! Whether it's efficiency, or just pointing out where I messed up. Please let me know what other details you need to help me.</p>