title: While loop to check user input for only positive integers
body: <p>I need help implementing a loop that keeps telling the user to enter only positive integers, but I don't know where to start. Can someone help me. </p>
  
  <pre><code>import java.util.Scanner;
  
  public class GCD {
  
  public static void main(String[] args) {
  
      Scanner input = new Scanner(System.in);
  
      System.out.print("Enter a positive integer: ");
        int firstN = input.nextInt();
  
      System.out.print("Enter another positive integer: ");
        int secondN = input.nextInt();
  
      System.out.println("The GCD of " + firstN + " and " + secondN + " is: " + gCd(firstN, secondN));
  
    } 
  
  public static int gCd(int firstN, int secondN) {
      if(secondN == 0) {
          return firstN;
      } else 
      return gCd(secondN, firstN%secondN);
  }
  
  }
  </code></pre>