Beispiel #1
0
        //----------------------------------
        static void Main(string[] args)
        {
            double x = 0, y = 0, r = 0;

            Console.WriteLine("To input co-ordinate:");
            Input(ref x, ref y);
            try
            {
                do
                {
                    Console.Write("To input r: ");
                    r = double.Parse(Console.ReadLine());
                } while (r < 0);
            }
            catch (Exception e) { Console.WriteLine(e); }
            Cycle c = new Cycle(x, y, r);

            c.View();
            Console.Write("Chu vi: {0:F3}\nDien tich: {1:F3}\nKhoang cach tam giac den goc toa do: {2:F3}\n", c.Circumference(), c.Area(), c.Line());
            Console.ReadKey();
        }