Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ATM {
- public static void main(String[] args) {
- int PIN = 3443;
- Scanner odczytPinu = new Scanner(System.in);
- System.out.println("Wprowadz PIN");
- int wpisanyPIN = odczytPinu.nextInt();
- for (int i = 1; wpisanyPIN != PIN; i++) {
- if (i < 3) {
- System.out.println("Wpisano zły PIN. Wpisz numer PIN ponownie");
- wpisanyPIN = odczytPinu.nextInt();
- } else {
- System.out.println("3 razy wpisano niepoprawny PIN. Karta zablokowana");
- return;
- }
- }
- System.out.println("Ile hajsu chcesz wyplacic? ");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement