Пример #1
0
        static void Main(string[] args)
        {
            int    n      = int.Parse(Console.ReadLine());
            Family family = new Family();

            for (int i = 0; i < n; i++)
            {
                string[] personData = Console.ReadLine().Split();
                string   name       = personData[0];
                int      age        = int.Parse(personData[1]);

                Person currPerson = new Person(name, age);
                family.AddMember(currPerson);
            }

            Person oldestMember = family.GetGetOldestMember();

            Console.WriteLine($"{oldestMember.Name} {oldestMember.Age}");
        }