public static SquareSequence SquareInitialize(int rightBorder)
        {
            SquareSequence sequence = null;

            if (Validator.ValidSquare(rightBorder))
            {
                sequence = new SquareSequence(1, rightBorder);
            }

            return(sequence);
        }
Esempio n. 2
0
        private static void Square(string[] args)
        {
            int border = Validator.Parsed(args[0]);


            SquareSequence squareSequence
                = SquareSequence.SquareInitialize(border);

            Console.WriteLine("Square sequence");

            foreach (int number in squareSequence.GetSequence())
            {
                Console.WriteLine(number);
            }
        }