Bonjour,
comme le titre dit,mon programme affiche aucun resultat !!
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27 public class Sansimport { public static void main(String []args) { int n = 0; int [] tab = new int[n]; for(int i = 0; i < (n - 1); i++) { for(int i1 = 0; i1 < (n - 1); i1++) { if(tab[i1] > tab[i1 + 1]) { int tempo = tab[i1]; tab[i1] = tab[i1 + 1]; tab[i1 + 1] = tempo; } } } // affichage du tableau for(int i = 0; i < n; i++) { System.out.print(tab[i] + " " ); } } }
Partager