For loop not giving me the required answer.

Printable View