bonjour
j'ai écris un code qui permet de charger un tableau par un nombre aléatoire
mais je n'arrive pas a trouver comment vérifier si il a déjà été tiré
merci
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8 public static void charger(int []t) { for (int i=0;i<20;i++) { int hazard=(int) (Math.random()*(20-1)+1); t[i]=hazard; } }
Partager