Differences between while and do–while loops
https://www.computersprofessor.com/2016/06/differences-between-while-and-dowhile.html
While Loop:
It is a looping construct
that will execute only it the test condition is true.
|
It is an entry-controlled
loop.
It is used for implementing common looping situations.
do-while Loop:
|
It is a looping construct
that will execute at least once even if test-condition is false.
|
It is an exist controlled
loop.
|
|
It is used for
implementing basic proms where the mere is required to be printed after once.
|