Computer Science, asked by rkritikkumar197632, 3 months ago

explain the usage of for NEXT loop with its syntax and example

Answers

Answered by kalechatimadhuri
1

Answer:

A for... next loop executes a set of statements for successive values of a variable until a limiting value is encountered. ... If the loop-ending condition is not met, the loop variable is incremented by 1 or by the value of the step expression and program control transfers back to the beginning of the loop

The initialization statement describes the starting point of the loop, where the loop variable is initialized with a starting value. A loop variable or counter is simply a variable that controls the flow of the loop. The test expression is the condition until when the loop is repeated.

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.

Answered by satyamrana15jan
1

Answer:

What is a loop explain in detail with example?

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.

Explanation:

How are the For Next loop used?

A for... next loop executes a set of statements for successive values of a variable until a limiting value is encountered. ... If the loop-ending condition is not met, the loop variable is incremented by 1 or by the value of the step expression and program control transfers back to the beginning of the loop.

Similar questions