Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis+ 2
So what is the difference between do and do...while loops?
2 Respostas
+ 14
do while() , while ()
/*in do while() , condition is checked after executing the statements , while in while () loop , condition is checked before execution of the statement(s)*/
+ 8
do whileĀ in an exit controlĀ loop.Ā whileĀ is an entry controlĀ loop. TheĀ differenceĀ is in when the condition gets evaluated. ...Ā Do while loopwill be executed atleast once.......butĀ while loopĀ will check the condition first and then it may or may not get executed depending on the condition.
https://stackoverflow.com/questions/3625759/difference-between-while-loop-and-do-while-loop