[tex]{ \boxed{ \boxed{ \pink{ \text{Answer:}}}}}[/tex]
The loop used only when we already knew the number of iterations. The 'while' loop used only when the number of iteration are not exactly known. If the condition is not put up in 'for' loop, then loop iterates infinite times. If the condition is not put up in 'while' loop, it provides compilation error.
[tex]\colorbox{pink}{\boxed{\tt{naning161094}}}[/tex]