Tushar Traders interview question

Write a code in pattern