Philips interview question

how to create a for loop