iFocus Systec interview question

They asked to write a code for different loops