I'm having trouble getting this for loop to work correctly

Printable View