Cognizant Interview Question

Write a program for the pattern.(They gave a simple pattern and asked to explain it)