import java.util.Scanner;
public class Main {
public static void main(String[] args) {
double[] list = new double[10] ;
Scanner scanner = new Scanner(System.in);
for (int i=0;i<10;i++){
System.out.println("请输入数:");
list[i]=scanner.nextDouble();}
for (int m=0;m<9;m++) {
for ( int j=0;j<9-m;j++){
if (list[j]>list[j+1]){
double q= list[j];
list[j]=list[j+1];
list[j+1]=q;}}}
System.out.println("最大:"+list[9]);
System.out.println("最小:"+list[0]);}}
用到了泡沫排序。