Pergunta de entrevista da empresa FDM Group

Difference between for and while loop?