Computer Science, asked by lalitya28, 11 months ago

what are the parts of loop​

Answers

Answered by India21vns
1

Explanation:

most loops have four essential parts.

<●>The setup: Usually the setup involves declaring and initializing an increment variable. This generally occurs immediately before the while.

<●>The test expression: The expression within the while loop that will cause the program to either execute the loop or exit and continue on. This always occurs within the parentheses following the keyword while.

<●>The body: This is the code within the braces.

<●>The increment: This is where the increment variable is incremented. This usually occurs at the end of the body.

HOPE IT HELPS YOU PLZZZ FOLLOW ME

Answered by Fairy26
0

Loop statement usually have four components -

  • Initialization - loop controls variables and other variables necessary in the loop are assigned initial values.
  • Continuation test - this boolean condition is the only thing specified inside of the parentheses of the while statement.
  • Loop body and update step - the loop body is the sequence of statements executed when the boolean test is true.

please mark me as a brain list.

Similar questions