Ejercicio09.java 830 Bytes
Newer Older
roshka committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package ejercicios;

import java.util.Scanner;

/**
 *
 * @author roshka
 */
public class Ejercicio09 {
    public static void main(String[] args){
        String pass = "holaxd";
        String pass2;
        Scanner scr = new Scanner(System.in);
        
        for (int i = 1; i < 4; i++){
            System.out.println("Ingrese contrasena: ");
            pass2 = scr.nextLine();
            if (pass.equals(pass2)) {
                System.out.println("Correcto");
                return;
            }else{
                System.out.println("Fallaste jaja xd");
            }
        }
        System.out.println("Hule amigo");
    }
}