Example #1
0
        static void Main(string[] args)
        {
            int            n        = int.Parse(Console.ReadLine());
            List <Student> students = new List <Student>();

            for (int i = 0; i < n; i++)
            {
                string[] studentInfo = Console.ReadLine().Split().ToArray();
                Student  newStudent  = new Student(studentInfo[0], studentInfo[1], double.Parse(studentInfo[2]));
                students.Add(newStudent);
            }

            students.Sort((b, a) => a.Grade.CompareTo(b.Grade));

            Student.PrintStudents(students);
        }