Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- int pin=12345;
- System.out.println("WELCOME TO THE BANK OF MITCHELL");
- System.out.println("ENTER YOUR PIN: ");
- Scanner keyboard = new Scanner(System.in);
- int entry = keyboard.nextInt();
- while (entry != pin) {
- System.out.println("\n INCORRECT PIN. TRY AGAIN.");
- System.out.println("ENTER YOUR PIN: ");
- entry = keyboard.nextInt();
- }
- System.out.println("\n PIN ACCEPTED. YOU NOW HAVE ACCESS TO YOUR ACCOUNT");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement