コード例 #1
0
        static void Main(string[] args)
        {
            string input = Console.ReadLine();

            while (input != "end")
            {
                Box box = Box.ReadBox(input);

                Console.WriteLine($"Box: {box.Width}, {box.Height}");
                Console.WriteLine($"Perimeter: {Box.CalculatePerimeter(box.Width, box.Height)}");
                Console.WriteLine($"Area: {Box.CalculateArea(box.Width, box.Height)}");

                input = Console.ReadLine();
            }
        }