import java.util.Scanner;
public class StudentInformation
{
public static void main(String[] args)
{
Student student1=new Student();
student1.inputData();
student1.inputGrades();
student1.inputInformation();
}
}
class Student
{
int classnum;
int number;
int sum=0;
int QQ;
int []grade=new int[i];
void inputData()
{
System.out.println("please input student's name classnum number QQ and many grades");
Scanner sc=new Scanner(System.in);
classnum=sc.nextInt();
number=sc.nextInt();
QQ=sc.nextInt();
grade=sc.nextInt();
}
int inputGrades()
{
Scanner sc=new scanner(system.in);
for(i=0;i<grade.length;i++)
System.out.println("请输入"+grade[i]+"成绩");
grade[i]=sc.nextInt();
}
int inputInformation()
{
System.out.println(+classnum,+number,+QQ);
for(int j=0;j<inputGrades.grade.length;j++)
System.out.println(" "+inputGrades.grade[j]);
}
}
|