Developpement/23DEV1.1/TPS2/TP01/Introduction/Tri.java

16 lines
349 B
Java
Raw Permalink Normal View History

2024-12-09 11:53:11 +01:00
import java.util.Arrays;
public class Tri {
public static void main(String[] args) {
int n = args.length;
int[] tab = null;
tab = new int[n];
for(int i = 0 ; i < n ; i++){
tab[i] = Integer.parseInt(args[i]);
}
Arrays.sort(tab);
for(int i = 0 ; i < tab.length ; i++){
System.out.println(tab[i]);
}
}
}