Philips Interview Question

how to create a for loop