how to generate list of 5 random numbers between 10 and 100 in java and to print the biggest random number . how i do that and chose that( with no array) and i dont knot how to continue. help !
public class Random {
public static void main(String[] args){
for(int i = 0; i < 5; i++){
System.out.println((int)((Math.random() * 91) + 10));
}
}
}
Aucun commentaire:
Enregistrer un commentaire