public class NumTest {
public static void main(String[] args) {
int[] arr = new int[10];
int max = 0,min = 0;;
int sum = 0;
for(int i = 0;i < 10;i++){
arr[i] = 2*i;
}
for(int i = 0;i < 10;i++){
max= arr[0];
if(arr[i] > max){
max = arr[i];
}
if(arr[i] < min){
min = arr[i];
}
sum += arr[i];
}
System.out.println("最小数:"+max);
System.out.println("最大数:"+min);
System.out.println("和:"+sum);
System.out.println("平均值:"+Double.parseDouble(String.valueOf(sum))/arr.length);
}
}