public class Score3 {//2차 배열로 성적 생성
public static void main(String[] args){
java.util.Scanner input=new java.util.Scanner(System.in);
String[] subname = {"국어","영어","수학"};
int[][] sub = new int[3][subname.length + 1];
//0첫번째사람1두번째사람2세번째사람
float[] avg = new float[3];
//3명에 대한 각각 평균값 저장
for(int k =0; k < sub.length; k++){
for(int i = 0; i <sub[k].length - 1; i++){
do{
System.out.print(subname[i] + " = ");
sub[k][i] = input.nextInt();
}while (sub[k][i] < 0 || sub[k][i] > 100);
sub[k][sub[k].length - 1] += sub[k][i];
//총점에다가 점수 누적
}
avg[k] = sub[k][sub[k].length - 1] /(float) (sub[k].length - 1);
}
for (int k = 0; k < sub.length; k++){
System.out.println();