public class sort { public static void main(String[] args) {
int[][] scores = { { 82, 90, 91 }, { 68, 72, 64 }, { 95, 91, 89 }, { 67, 52, 60 }, { 79, 81, 85 }, }; int sum = 0; for (int i = 0;i < 5; i++){ for (int j =0; j < 3; j++){ sum += scores[i][j]; } } System.out.printf("这些学生的平均分为%.2f:",(float)sum/15); }}
Sign in to make a reply
哲哲不打折-