Advertisement
CamiloCastilla

Untitled

Nov 18th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.68 KB | None | 0 0
  1. package com.company;
  2. import java.util.Scanner;
  3. public class Main {
  4.         public static void main(String[] args) {
  5.             Scanner keyboard = new Scanner(System.in);
  6.             int pin = 50005;
  7.  
  8.             System.out.println("WELCOME TO THE BANK OF CAMILO.");
  9.             System.out.print("ENTER YOUR PIN: ");
  10.             int entry = keyboard.nextInt();
  11.  
  12.             while (entry != pin) {
  13.                 System.out.println("\nINCORRECT PIN. TRY AGAIN.");
  14.                 System.out.print("ENTER YOUR PIN: ");
  15.                 entry = keyboard.nextInt();
  16.             }
  17.  
  18.             System.out.println("\nPIN ACCEPTED. YOU NOW HAVE ACCESS TO YOUR ACCOUNT.");
  19.         }
  20.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement