Acty System India interview question

Patterns based question using loops