Assignemnt #60 Enter Your PIN
Code
/// Name: Drew Boxold
/// Period: 5
/// Program Name: Enter Your PIN
/// File Name: EnterPIN.java
/// Date Finished: 12/4/15
import java.util.Scanner;
public class EnterPIN
{
public static void main(String[] args)
{
Scanner keyboard = new Scanner(System.in);
int pin = 12345;
System.out.println("WELCOME TO THE BANK OF DREW.");
System.out.print("ENTER YO PIN: ");
int entry = keyboard.nextInt();
while (entry != pin)
{
System.out.println("\nINCORRECT PIN. SUCKA.");
System.out.print("ENTER YOUR PIN: ");
entry = keyboard.nextInt();
}
System.out.println("\nPIN ACCEPTED. ACCESS TO YO ACCOUNT.");
}
}
Picture of the output