Can anyone show me the difference between for loop and while | Sololearn: Learn to code for FREE!

+1

Can anyone show me the difference between for loop and while

For loop and while

3/19/2020 3:15:32 PM

Makoye Ndalahwa

5 Answers

New Answer

+6

Remember to use the search bar for frequently asked questions. :> https://www.sololearn.com/Discuss/568704/?ref=app https://www.sololearn.com/Discuss/2039034/?ref=app https://www.sololearn.com/Discuss/2122812/?ref=app https://www.sololearn.com/Discuss/400480/?ref=app

+2

A for loop will repeat a number of times indicated the instruction that you ask to do. Unlike a while loop that will repeat the instruction indefinitely as long as the condition is not fulfilled. if you have to make a loop but you don't know how many times you are going to pass and pass in it, you will have to make a while and not a for. 😃

+1

https://stackoverflow.com/questions/2950931/for-vs-while-in-c-programming

+1

Which language ?

+1

Jean_Mionnet C++