Assignemnt #60, Enter Your PIN

Code

      /// Name: Alex Pinder
      /// Period: 5
      /// Program Name: Enter Your PIN
      /// File Name: prog60.java
      /// Date Complete: 1/6/16
      
      import java.util.Scanner;
      
      public class prog60
      {
      	public static void main( String[] args )
      	{
      		Scanner keyboard = new Scanner(System.in);
      		int pin = 40901;
      
      		System.out.println("WELCOME TO THE BANK OF ALEX.");
      		System.out.print("ENTER YOUR PIN: ");
      		int entry = keyboard.nextInt();
      
      		while ( entry != pin )
      		{
      			System.out.println("\nINCORRECT PIN. TRY AGAIN.");
      			System.out.print("ENTER YOUR PIN: ");
      			entry = keyboard.nextInt();
      		}
      
      		System.out.println("\nPIN ACCEPTED. YOU NOW HAVE ACCESS TO YOUR ACCOUNT.");
      	}
      }
    

Picture of the output

Assignment 60