EAI Technologies Interview Question

There was a question on iterative loops and printing values from that loop.