Computer Science, asked by akshatt73, 1 year ago

Explain do while loop​

Answers

Answered by Niruru
13

\bf\underline{Do \:While \:Loop}

Do while loop is an another kind of loop and different from "for loop" and "while loop". This loop will execute the statement at least once, even if the condition is false.

The condition will be checked after the loop has been executed. The loop will continue to execute or will terminate according to on the condition.

\bf {Syntax :-}

var i =1;

do

{

alert (i);

i = i + 1;

}

while (i < 10)

//At this point the value of i is 10

Answered by msrishti0104
1

Answer:

Do while loop is an exit controlled loop which brings the execution of the program in the loop atleast once even if the condition is false.

The block of statements in the loop will be executed atleast once irrespective of its satisfying the condition.

The syntax of do while loop is:

do{

block of statements

}while(condition)

If this answer is helpful, please mark it the brainliest:)

Explanation:

Similar questions