Use Caution When Reinitializing Variables Inside a Loop Still getting wrong answer why?

Hi,
I found some explanations regarding your question in the post linked below:

Hope it helps.
Regards.