Skip to content

Commit 7d2a902

Browse files
committed
🔀 - Generate Random numbers in table
1 parent 664a4be commit 7d2a902

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Tri-a-bulles-optimise/src/Iteratif.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
// Import Arrays
22
import java.util.Arrays;
3+
import java.util.Random;
34

45
public class Iteratif {
56

67
public static void main(String[] args) {
78
// write your code here
89
// Clear console
910
System.out.print("\033\033");
11+
12+
Random rand = new Random();
1013

1114
// Tableau de test
12-
int[] tableau = { 1, 3, 7, 2, 6, 4, 5, 8, 10, 9 };
15+
int[] tableau = { rand.nextInt(100), rand.nextInt(100), rand.nextInt(100), rand.nextInt(100), rand.nextInt(100), rand.nextInt(100), rand.nextInt(100), rand.nextInt(100), rand.nextInt(100), rand.nextInt(100) };
1316

1417
triBulle(tableau);
1518
}

0 commit comments

Comments
 (0)