Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Password {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- //регистрация
- String userName = scanner.nextLine();
- String password = scanner.nextLine();
- String currentTry = scanner.nextLine();
- //въвеждаме паролата докато != на password
- while (!currentTry.equals(password)){
- currentTry = scanner.nextLine();
- }
- System.out.printf("Welcome %s!", userName);
- }
- }
Add Comment
Please, Sign In to add comment