iFocus Systec Interview Question

They asked to write a code for different loops