Ajout des TP
This commit is contained in:
BIN
BUT1/DEV2.2/TP1-Introduction/EXO 4/exo4.class
Normal file
BIN
BUT1/DEV2.2/TP1-Introduction/EXO 4/exo4.class
Normal file
Binary file not shown.
24
BUT1/DEV2.2/TP1-Introduction/EXO 4/exo4.java
Normal file
24
BUT1/DEV2.2/TP1-Introduction/EXO 4/exo4.java
Normal file
@@ -0,0 +1,24 @@
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* DOC
|
||||
*/
|
||||
|
||||
public class exo4 {
|
||||
/**
|
||||
* DOC
|
||||
*/
|
||||
public static void main(String[] args){
|
||||
int[] tableauDeInt = new int[args.length];
|
||||
int index = 0;
|
||||
for(String valeur : args){
|
||||
int nombreTemporaire = Integer.parseInt(valeur);
|
||||
tableauDeInt[index] = nombreTemporaire;
|
||||
index++;
|
||||
}
|
||||
Arrays.sort(tableauDeInt);
|
||||
for(int j = 0; j<index;j++){
|
||||
System.out.println(tableauDeInt[j]);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user