I think maybe it's supposed to be i != 25 and not i = 25? I'm pretty sure that i = 25 means the condition for continuation, not the condition for stopping.