Rolustech interview question

Coding question for loop (very easy)