Computer Science, asked by prativasahu2, 10 months ago

What is the body of the loop?

Answers

Answered by mukulg756
1

Answer:

The body of a loop is the code that you actually care about running multiple times. It's the stuff that comes in between "FOR" and "NEXT; or between "WHILE" and "WEND"; or between "DO" and "LOOP"; etc. The loop itself includes its body, as well as the conditional logic and control structures that surround it.

please mark it brainliest

And

follow me

Answered by SƬᏗᏒᏇᏗƦƦᎥᎧƦ
65

⭐Body of loop⭐

This is the set of instructions that is executed repeatedly, grouped together between a pair of curly brackets.

For example:—

{

System.out.println("Iteration: " + counter);

sum = sum + counter;

}

The body of loop is repeated as long as the test-condition remains true. Depending on when the test-condition is evaluated, the loop can be classified as an entry-controlled loop or as an exit-controlled loop.

➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖

1. Entry-controlled loop

In an entry-controlled loop, the test-condition is evaluated before the start of the loop. If the test-condition is satisfied, the body of loop will be executed. If the test-condition is not satisfied, the body of the loop will not be executed and the loop will terminate.

2. Exit-controlled loop

In an exit-controlled loop, the test-condition is evaluated at the end of the loop body. Since the test-condition is not evaluated until the end of the loop, the body of an exit-controlled loop is always executed at least once.

➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖

Hope it helps you it is not copied from any external source

Similar questions