public static void Main()
        {
            Rectangle firstRect  = new Rectangle().ReadRectangle();
            Rectangle secondRect = new Rectangle().ReadRectangle();

            Console.WriteLine(firstRect.IsInside(secondRect) ? "Inside" : "Not inside");
        }
예제 #2
0
        static void Main(string[] args)
        {
            int[] firstRectArgs   = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
            int[] seecondRectArgs = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();

            Rectangle firstRectangle = new Rectangle
            {
                Left   = firstRectArgs[0],
                Top    = firstRectArgs[1],
                Width  = firstRectArgs[2],
                Height = firstRectArgs[3],
            };

            Rectangle secondRectangle = new Rectangle
            {
                Left   = seecondRectArgs[0],
                Top    = seecondRectArgs[1],
                Width  = seecondRectArgs[2],
                Height = seecondRectArgs[3],
            };

            if (firstRectangle.IsInside(secondRectangle))
            {
                Console.WriteLine("Inside");
            }
            else
            {
                Console.WriteLine("Not inside");
            }
        }
예제 #3
0
        static void Main(string[] args)
        {
            Rectangle first  = ReadRectangle();
            Rectangle second = ReadRectangle();

            Console.WriteLine(first.IsInside(second) ? "Inside" : "Not inside");
        }
예제 #4
0
        static void Main(string[] args)
        {
            Rectangle firstRectangle  = ReadRectangle();
            Rectangle secondRectangle = ReadRectangle();

            bool result = firstRectangle.IsInside(secondRectangle);

            string printResult = result ? $"Inside" : $"Not inside";

            Console.WriteLine(printResult);
        }
예제 #5
0
        static void Main()
        {
            Rectangle rec1 = new Rectangle(Console.ReadLine());
            Rectangle rec2 = new Rectangle(Console.ReadLine());

            if (rec1.IsInside(rec2))
            {
                Console.WriteLine($"Inside");
            }
            else
            {
                Console.WriteLine($"Not inside");
            }
        }
예제 #6
0
        static void Main(string[] args)
        {
            Rectangle firstRect  = ReadRectangle();
            Rectangle secondRect = ReadRectangle();
            bool      isInside   = firstRect.IsInside(secondRect);

            if (isInside)
            {
                Console.WriteLine("Inside");
            }
            else
            {
                Console.WriteLine("Not inside");
            }
        }