解题思路:
注意事项:
参考代码:
import java.text.DecimalFormat; import java.util.Arrays; import java.util.HashMap; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int[] a = new int[10]; for (int i = 0; i < a.length - 1; i++) { a[i] = scanner.nextInt(); } int b = scanner.nextInt(); a[9] = b; Arrays.sort(a); for (int i = 0; i < a.length; i++) { System.out.println(a[i]); } } }
0.0分
0 人评分