Loops problems

Hey Guys..
Is there any problem which cann't be solved by using all the three loops at??
and any problem which can only be solved by For loop??
Hi,

A for loop is good when you have a known number of iterations.

A while loop is better when the end condition is more complicated.

I personally avoid do-while loops (I can usually always find a way to use a while loop), I am not the only one K&R (who invented C) & Stroustrup (C++) apparently don't always like them either.

All 3 types of loops can be re written into 1 of the other forms.

Hope all is well :+)
Topic archived. No new replies allowed.