NATEK interview question

Simple loops.