+3 votes
in Class 12 by kratos

Write the syntax and example for WHILE loop.

1 Answer

+6 votes
by kratos
 
Best answer

Syntax of while loop:

while (condition)

{

statement (*);

}

Example:

include

void main()

{

int a = 10;

while (a<15)

{

cout<<"value of a:"<<a<<end1;

a++;

}

}

...