示例#1
0
 public static void Main(string[] args)
 {
     try
     {
         string input  = Console.ReadLine();
         double result = SquareRootCalculator.CalculateSquareRoot(input);
         Console.WriteLine(result);
     }
     catch (ArgumentOutOfRangeException aore)
     {
         Console.WriteLine(aore.Message);
     }
     catch (ArgumentException ae)
     {
         Console.WriteLine(ae.Message);
     }
     finally
     {
         Console.WriteLine("Good bye");
     }
 }
示例#2
0
        static void Main()
        {
            string input = Console.ReadLine();

            SquareRootCalculator.Check(input);
        }