Computer Science, asked by krishnatripathi1, 3 months ago

Explain for loop statements in detail​

Answers

Answered by Anonymous
21

\fbox\pink{A}\fbox\blue{n}\fbox\purple{s}\fbox\green{w}\fbox\red{e}\fbox\orange{r}In computer science, a for-loop (or simply for loop) is a control flow statement for specifying iteration, which allows code to be executed repeatedly. ... The header often declares an explicit loop counter or loop variable, which allows the body to know which iteration is being executed.

Answered by Aera2542
2

Answer:

In computer science, a for-loop (or simply for loop) is a control flow statement for specifying iteration, which allows code to be executed repeatedly. ... The header often declares an explicit loop counter or loop variable, which allows the body to know which iteration is being executed.Similar to a While loop, a For loop consists of three parts: the keyword For that starts the loop, the condition being tested, and the EndFor keyword that terminates the loop.A loop is used for executing a block of statements repeatedly until a particular condition is satisfied. For example, when you are displaying number from 1 to 100 you may want set the value of a variable to 1 and display it 100 times, increasing its value by 1 on each loop iteration.

Attachments:
Similar questions