Exemplo n.º 1
0
        public static void Main(string[] args)
        {
            int    n      = int.Parse(Console.ReadLine());
            Family family = new Family();

            for (int i = 0; i < n; i++)
            {
                string[] input  = Console.ReadLine().Split(" ");
                string   name   = input[0];
                int      age    = int.Parse(input[1]);
                Person   person = new Person(name, age);
                family.AddMember(person);
            }
            Person oldestPerson = family.GeT();

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