示例#1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Size");
            int a = 0;
            int k = int.Parse(Console.ReadLine());

            Student[] Students = new Student[k];
            for (int i = 0; i < k; i++)
            {
                var student = new Student();
                Console.WriteLine("Name");
                student.Name = Console.ReadLine();

                Console.WriteLine("Group");
                student.Group = int.Parse(Console.ReadLine());
                student.Ses   = new int[5];
                for (int j = 0; j < 5; j++)
                {
                    Console.WriteLine("Mark {0}", j + 1);
                    student.Ses[j] = int.Parse(Console.ReadLine());
                }
                Students[i] = student;
            }

            foreach (var student in Students)
            {
                if (student.IsGoodStudent(student.Ses) == true)
                {
                    student.WriteStudent();
                }
            }
            Console.ReadKey();
        }