0
What difference between while loop and for loop?
2 Answers
0
While is used when we dont know exactly how many number of times the loop should be executed. In most cases the user give the value of how many times the program should be executed.
For is used when we exactly know how many number of times the loop should be executed. In most of the cases the programmer sets the value of number of times to be executed.
Its that simple.
GoodLuck. Rise & Shine.
0
What if you embedded a for loop in a while loop but the while loop was infinitely false.