namespace Reconstruction.Functions
{
    public static class Functions
    {
        public static void WelcomePrint()
        {
            if (DateTime.Now.Hour > 4 && DateTime.Now.Hour < 12)
            {
                Console.WriteLine("Good Morning");
            }
            else if (DateTime.Now.Hour >= 12 && DateTime.Now.Hour < 17)
            {
                Console.WriteLine("Good afternoon");
            }
            else if (DateTime.Now.Hour >= 17 && DateTime.Now.Hour > 0)
            {
                Console.WriteLine("Good evening");
            }
            else
            {
                Console.WriteLine("Good night");
            }

        }

        public static int Choose()
        {
            while(true)
            {
                int i = 0;
                Console.Write("Enter a value: ");
                try
                {
                    i = int.Parse(Console.ReadLine());
                    if(i == 0)
                        System.Diagnostics.Process.GetCurrentProcess().Kill();
                    else
                        return i;
                }
                catch
                {
                    Console.WriteLine("You entered a wrong value");
                }
            }
        }





    }


}
