Computer Science, asked by kevinrediya93, 8 months ago

Define for Next loop in OBASIC​

Answers

Answered by Anonymous
1

\huge\mathfrak\purple{✔Answer}

The FOR NEXT statement is used to repeat a block of instructions a specified number of times.

Answered by shraddha837
0

Answer:

The FOR NEXT Statement

The FOR NEXT statement is used to repeat a block of instructions a specified number of times. The syntax is as follows:

FOR counter = start TO end [STEP increment]

[block of instructions]

NEXT

In the FOR NEXT statement a block of instructions is executed a number of times. The value of the variable counter is incremented by 1 until it equals to the value of end.

ɪɴ The variable counter, by default, increases by 1. You can change the rate at which the variable counter increments after each revolution by using the STEP parameter: See example 2 for an illustration.

the example above the instruction in green: PRINT counter is executed 10 times. After each loop the value of the variable counter is incremented by 1.

Similar questions