Cybrosys Technologies interview question

Write a program to print the given pattern