I need help with loops?

This is how I would do it.