- import java.io.*;
- import java.util.Arrays;
- public class Ch48 {
-
- int n[],len;
- BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
- String raw[];
- Ch48() throws Exception
- {
- System.out.print("enter some 整數");
- raw=br.readLine().split(" ");
- len=raw.length;
- for(int i=0;i<len;i++)
- n[i]=Integer.parseInt(raw[i]);
- Arrays.sort(n);
- for(int i=0;i<len;i++)
- System.out.print(n[i]+" ");
- System.out.println();
- }
- public static void main(String[] args) {
- new Ch48();
- }
- }
複製代碼 |