Assignment #60 Enter Your PIN

Code

      ///Name: Ian Grant
      ///Period:5
      ///Project Name: Enter Your PIN
      ///File Name:GoatBank.java
      ///11/10/15
      
      import java.util.Scanner;
      public class GoatBank
      {
          public static void main(String[] args)
          {
              Scanner stuff=new Scanner(System.in);
              int pin = 12345;
              System.out.println("Welcome to the Bank of Goat.");
              System.out.print("Enter your PIN: ");
              int attempt = stuff.nextInt();
              while (attempt != pin)
              {
                  System.out.println("\nINCORRECT PIN! TRY AGAIN.");
                  System.out.print("ENTER YOUR PIN: ");
                  attempt = stuff.nextInt();
              }
              System.out.println("\nPIN ACCEPTED. YOU NOW HAVE ACCESS TO YOUR GOAT ACCOUNT.");
          }
      }
      

Output