Pergunta de entrevista da empresa Syed

1) loops 2) logical thinking question