import java.util.Scanner;
public class E {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner scanner=new Scanner(System.in);
int a[]=new int[10];
//接受10个值
for (int i = 0; i < a.length; i++) {
a[i]=scanner.nextInt();
}
//冒泡排序
for (int i = 1; i < a.length; i++) {
for (int j = 0; j < a.length-i; j++) {
if (a[j]<a[j+1]) {
int tmpe=a[j];
a[j]=a[j+1];
a[j+1]=tmpe;
}
}
}
//最大值
System.out.println(a[0]);
//最小值
System.out.println(a[a.length-1]);
}
}
希望对你有所帮助