回覆列表
  • 1 # 讓跑步更有力量

    import java.util.Arrays;

    import java.util.Scanner;

    public class DataCompare {

    public static void main(String[] args) {

    int[] ary = new int[3];

    Scanner scanner = new Scanner(System.in);

    for(int i = 0; i < ary.length; i++){

    System.out.print("Please input a digit(Seq: " + (i+1) + "): ");

    ary[i] = scanner.nextInt();

    }

    Arrays.sort(ary);

    System.out.print("After sorted by ASC, the numbers are: ");

    for(int i = 0; i < ary.length; i++){

    System.out.println(ary[i] + "\t");

    }

    }

    }

  • 中秋節和大豐收的關聯?
  • 男友對自己很好,但是不喜歡他的性格,該不該分手呢?有何依據?