0

if for and while loop work same , how we understand which loop is use in specific condition

12th Dec 2016, 3:43 AM
Manoj singh jalal
Manoj singh jalal - avatar
3 Respostas
+ 3
Use for loop if you have the range of loop condition. Use while if you'r not determine the loop condition. *correct me if iam wrong.
12th Dec 2016, 3:59 AM
Biobii
Biobii - avatar
0
thanks
12th Dec 2016, 4:07 AM
Manoj singh jalal
Manoj singh jalal - avatar
0
for loop : when u now the start and end count of ur loop while: when ur not sure of ur loop count, but it's condition based do while: same as of while but with the exception that do-while s will run loop body at least once
12th Dec 2016, 4:08 AM
Morpheus
Morpheus - avatar