Computer Science, asked by sgaganjot68, 4 months ago

when is the while statement preferred over a for statement?​

Answers

Answered by anagathalamadhavi601
1

Answer:

Generally, use for loops when you have a defined range of values to iterate over. Use while loops when you aren't iterating, or don't know when your exit condition will be true.

Answered by Anonymous
4

Answer:

Generally, use for loops when you have a defined range of values to iterate over. Use while loops when you aren't iterating, or don't know when your exit condition will be true.

Similar questions