previous | start | next

Simple Loops (Syntax 4.4 : while Statement)

Syntax 4.4 : while Statement

while (condition) statement
Example:
while (x >= 10) x = sqrt(x);
Purpose: Execute the statement while the condition remains true.


previous | start | next