Quiz question of fundamental programming1

i cant understand the solution of problem 5
can you please explain