it depends on the problem: a for loop is comfier when you know the number of iterations you need, and you're better off with a while loop when the iterations can't be really defined as an exact value
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.