标签:alt oid pack i++ mic sum http pac ack
第一题
package test; import java.util.Scanner; public class hhh { public static void main(String[] args) { // TODO Auto-generated method stub int a[] = new int[9], max,min,f,sum=0; Scanner input = new Scanner(System.in); for (int i = 0; i < a.length; i++) { a[i] = input.nextInt(); } max = a[0]; min=a[0]; for (int j = 0; j < a.length; j++){ if (a[j] > max) max = a[j]; } for (int z = 0; z < a.length; z++){ if (a[z] < min) min = a[z]; } for(f=0;f<a.length;f++){ if(a[f]!=min||a[f]!=max) sum+=a[f];} System.out.println("品骏值为"+sum/8); } }
第二题
标签:alt oid pack i++ mic sum http pac ack
原文地址:https://www.cnblogs.com/1353b/p/12711567.html