public class Test {
private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
public static String getString(){
try {
return br.readLine();
} catch (IOException e) {
return "";
}
}
public static int getInt(){
return Integer.parseInt(getString());
}
public static void main(String[] args){
int[] s = new int[5];
for(int i=0; i System.out.print("请输入第 " + (i+1) + " 个数: ");
s[i] = getInt();
}
int min = s[0];
int max = s[0];
for(int i=1; i if(s[i] > max){
max = s[i];
}
if(s[i] < min){
min = s[i];
}
}
System.out.println("最大是: " + max);
System.out.println("最小是: " + min);
}
}