using System;
namespace Lab1
{
    public class Program
    {
        private static System.Timers.Timer? aTimer;

        public static void Main(string[] args)
        {
            aTimer = new System.Timers.Timer
            {
                Interval = 1000
            };
            aTimer.Elapsed += OnTimedEvent;
            aTimer.Start();
            Console.Read();
            return;
        }

        public static void OnTimedEvent(object? source, System.Timers.ElapsedEventArgs e)
        {
            var now = DateTime.UtcNow;
            Console.Clear();
            Console.WriteLine("Date:");
            Console.WriteLine($"Decimal: {now.Day:D2}/{now.Month:D2}/{now.Year:D4}");
            Console.WriteLine($"Hexa: {now.Day:X2}/{now.Month:X2}/{now.Year:X4}");
            Console.WriteLine($"Binary: {now.Day:b5}/{now.Month:b4}/{now.Year:b16}");
            Console.WriteLine("Time:");
            Console.WriteLine($"Decimal: {now.Hour:D2}:{now.Minute:D2}:{now.Second:D2}");
            Console.WriteLine($"Hexa: {now.Hour:X2}:{now.Minute:X2}:{now.Second:X2}");
            Console.WriteLine($"Binary: {now.Hour:b6}:{now.Minute:b6}:{now.Second:b6}");
        }
    }
}
