private static void countScore() {
int[] sum = new int[3];
Scanner sc = new Scanner(System.in);
int score;
for (int i = 0; i < 3; i++) {
System.out.println("请输入" + (i + 1) + "班的人数:");
int renshu = sc.nextInt();
int[][] stu = new int[3][renshu];
System.out.println((i + 1) + "班的人数为:" + renshu);
int temp = 0;
for (int j = 0; j < renshu; j++) {
System.out.println("请输入" + (i + 1) + "班的第" + (j + 1)
+ "名同学的成绩为:");
stu[i][j] = sc.nextInt();
sum[i] = sum[i] + stu[i][j];
}
System.out.println((i + 1) + "班的总成绩为:" + sum[i]);
for (int j = 0; j < renshu; j++) {
for (int j2 = renshu - 1; j2 > i; j2--) {
if (stu[i][j2] < stu[i][j2 - 1]) {
temp = stu[i][j2 - 1];
stu[i][j2 - 1] = stu[i][j2];
stu[i][j2] = temp;
}
}
}
System.out.println((i+1)+"班童鞋升序排列后为:");
for (int j = 0; j < renshu; j++) {
//System.out.println();
System.out.println("名次:"+(j+1)+"\t成绩:"+stu[i][j] + "\t");
}
System.out.println();
}
System.out.println();
System.out.println("1班的总成绩为:" + sum[0] + "\n2班的总成绩为:" + sum[1]
+ "\n3班的总成绩为:" + sum[2]+"\n");
}