import java.util.Random;
import java.util.Scanner;
public class Game {
public static void main(String[] args) {
Scanner numRamdom = new Scanner(System.in);
int numeroGenerado = new Random().nextInt(100);
int intentos = 0;
while (intentos < 5 ){
System.out.println("Decifre el numero");
if (numRamdom.nextInt() == numeroGenerado){
System.out.println("El numero es correcto ganaste y has realizado : " + intentos + " intentos" );
break;
}else {
System.out.println("El numero es incorrecto, el numero correcto era: " + numeroGenerado);
}
intentos++;
}
}
}