int min = 20;
int max= 150;
System.out.println("Random value from "+min+" to "+max+ ":");
for(int i = 0; i<2; i++) {
int random_int = (int)Math.floor(Math.random()*(max-min+1)+min);
System.out.println(random_int);
I get two random number in the output, but I don't know how to proceed with determining the highest value in the output?
Aucun commentaire:
Enregistrer un commentaire