What is the difference between a while loop and do-while loop?
Please give answer in ur own words
Answers
simply speaking, do while is an exit controlled loop but while is an entry controlled loop. Do while will first execute its block of commands and then check if condition is true to repeat the commands. It will run at least once as condition is checked after running commands. The while loop will check condition before running, so it may not run even once.
MARK AS BRAINLIEST
1.The main difference between a while loop and do while loop is that while loop check condition before iteration of the loop, whereas do-while loop, checks the condition after the execution of the statements inside the loop.
2. while loop, which tests the condition before the code within the block is executed, the do-while loop is an exit-condition loop. This means that the code must always be executed first and then the expression or test condition is evaluated. If it is true, the code executes the body of the loop again.
hope it will help u ...