Input : Number of Rows

Output:

1
0 1
1 0 1
0 1 0 1
1 0 1 0 1

Code

        public static void PrintNumberPattern1(int rows)
        {

            string output = "";
            for (int i = 0; i < rows; i++)
            {
                if (i % 2 == 0)
                    output = "1 " + output;
                else
                    output = "0 " + output;

                Console.WriteLine(output);
            }
        }