Zephyr (CA) interview question

write a program for the given pattern