When we use for loop and while loop?

when we use for loop and while loop?

2 Likes

for loop is used when the number of iterations is known, whereas execution is done in the while loop until the statement in the program is proved wrong

3 Likes