Exemplo n.º 1
0
        static void Main(string[] args)
        {
            string firstDate  = Console.ReadLine();
            string secondDate = Console.ReadLine();

            Console.WriteLine(DataModifier.CalculateDifference(firstDate, secondDate));
        }
Exemplo n.º 2
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[] personsArgs = Console.ReadLine()
                                       .Split();

                string name = personsArgs[0];
                int    age  = int.Parse(personsArgs[1]);

                Person person = new Person(name, age);
                family.AddMembers(person);
            }

            Person oldest = family.GetOldestMember();

            Console.WriteLine(oldest);

            List <Person> getPeopleOverThirty = family.GetPeopleOverThirty();

            Console.WriteLine(string.Join(Environment.NewLine, getPeopleOverThirty));

            string firstInputYear   = Console.ReadLine();
            string secoundInputYear = Console.ReadLine();

            DataModifier dateModifier = new DataModifier();

            var difference = dateModifier.CalculateTheDifference(firstInputYear, secoundInputYear);

            Console.WriteLine(difference);
        }
Exemplo n.º 3
0
        public static void Main()
        {
            var firstDate  = Console.ReadLine();
            var secondDate = Console.ReadLine();

            var diffInDays = DataModifier.CalculatesDifference(firstDate, secondDate);

            Console.WriteLine(diffInDays);
        }