INCONVENIENTE CON Math.random
Publicado por martin (4 intervenciones) el 08/05/2008 02:53:16
CON EL SIGUIENTE CODIGO YO CONSIGO UN NUMERO ENTRE EL 0 Y EL 25, BIEN YO NO QUIERO UN NUMERO ALEATORIO, NECESITO GENERAR 100 NUMEROS AL AZAR ENTRE UN RANGO DE VALORES Y NO SE COMO HACERLO. DESDE YA MUCHAS GRACIAS.
public class EjAleatorios {
public static void main(String[] args) {
int numeroAleatorio = (int) (Math.random()*25+0);
System.out.println(numeroAleatorio);
}
}
public class EjAleatorios {
public static void main(String[] args) {
int numeroAleatorio = (int) (Math.random()*25+0);
System.out.println(numeroAleatorio);
}
}
Valora esta pregunta


0