explain the difference in while and do while loops
Answers
Answered by
11
✌✌hey mate ur ans✌✌
➡WHILE LOOP
✨while loops is entry control loop
✨while loop first check the condition then execute the statement
✨The loop will not execute at all if conditions is not satisfied
▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪
➡➡DO WHILE LOOP
✨it is known as exit control loop
✨it check the condition after execution
✨the loop will execute at least once
☺☺hope it helps Mark as brainliest and follow me☺☺
➡WHILE LOOP
✨while loops is entry control loop
✨while loop first check the condition then execute the statement
✨The loop will not execute at all if conditions is not satisfied
▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪
➡➡DO WHILE LOOP
✨it is known as exit control loop
✨it check the condition after execution
✨the loop will execute at least once
☺☺hope it helps Mark as brainliest and follow me☺☺
Answered by
4
Explain the differences between while and do while loops.
Looping statements will not be executed in while loop if condition is not satisfied but in do while loop the looping statements are executed at least once even if the conditions prove to be false.
The condition of loop is checked in the beginning of the while loop but the condition is checked at the end of do while loop.
The while loop requires only one statement(i.e. While) to complete the loop whereas in do while loop the two statements(i.e. do and while) are needed to complete the loop.
The while loop is entry-controlled whereas the do while loop is exit- controlled.
BrainlyPromoter:
welcome
Similar questions