07/10/19 23:57:32
>>297
import java.io.*;
public class Kadai22 {
public static void main(String args[]) throws IOException,NumberFormatException{
// データの初期設定
Tokuten2 tokuten[] = new Tokuten2[3];
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
for(int i=0;i<tokuten.length;++i){
System.out.println("input name as No."+i);
String name=br.readLine();
System.out.println("input eng as No."+i);
int eng =Integer.parseInt(br.readLine());
System.out.println("input math as No."+i);
int math=Integer.parseInt(br.readLine());
System.out.println("input sci as No."+i);
int sci =Integer.parseInt(br.readLine());
tokuten[i]=new Tokuten2(name,eng,math,sci);
}
// データを表示させる
(以降同じ)