BNP Paribas Interview Question

Wap to print a pattern