Computer Science, asked by ankithgowda24680, 1 month ago

explain while loop with syntax and example​

Answers

Answered by havyadarji2007
1

★᭄ꦿ᭄Answer★᭄ꦿ᭄

The syntax of a while loop in C programming language is − while(condition) { statement(s); } Here, statement(s) may be a single statement or a block of statements. The condition may be any expression, and true is any nonzero value. The loop iterates while the condition is true.

Answered by Ᏸυէէєɾϝɭყ
1

Answer:

do-while loop is similar to while loop, however there is a difference between them: In while loop, condition is evaluated first and then the statements inside loop body gets executed, on the other hand in do-while loop, statements inside do-while gets executed first and then the condition is evaluated.

Similar questions