Beispiel #1
0
        public double LengthRing()
        {
            double l1 = External.Length();
            double l2 = External.Length();

            return(l1 - l2);
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            Round round = new Round(5, 5, 25);

            Console.WriteLine("Square of round: {0}", round.Square(round));
            Console.WriteLine("Length of round: {0}", round.Length(round));
            Console.ReadLine();
        }
Beispiel #3
0
 static void Main(string[] args)
 {
     while (true)
     {
         double x = 0, y = 0, R = 0;
         Console.WriteLine("Введите X: ");
         string input = Console.ReadLine();
         if (Chack(input))
         {
             x = double.Parse(input);
         }
         Console.WriteLine("Введите Y: ");
         input = Console.ReadLine();
         if (Chack(input))
         {
             y = double.Parse(input);
         }
         Console.WriteLine("Введите радиус: ");
         input = Console.ReadLine();
         if (Chack(input))
         {
             R = double.Parse(input);
         }
         Round round = new Round(x, y, R);
         Console.WriteLine("Длина окружности = " + round.Length());
         Console.WriteLine("Площадь окружности = " + round.Square());
         ConsoleKeyInfo end = new ConsoleKeyInfo();
         Console.WriteLine("Для выхода нажмите Esc...");
         end = Console.ReadKey();
         if (end.Key == ConsoleKey.Escape)
         {
             break;
         }
         Console.WriteLine();
     }
 }
Beispiel #4
0
 public double SumLength()
 {
     return(outRound.Length() + inRound.Length());
 }