Write the syntax of while and do-while loop.
Answers
Answered by
3
Answer:
Syntax. do { statement(s); } while( condition ); Notice that the conditional expression appears at the end of the loop, so the statement(s) in the loop executes once before the condition is tested. If the condition is true, the flow of control jumps back up to do, and the statement(s) in the loop executes again.
Answered by
2
while loop is executed once before the condition is checked. Its syntax is: do { // body of loop; } while (condition); ... If the condition evaluates to true , the body of the loop inside the do statement is executed again.
Similar questions
Chemistry,
2 months ago
English,
2 months ago
Math,
5 months ago
English,
10 months ago
Business Studies,
10 months ago