Computer Science, asked by hriddhant99, 1 year ago

what is nested loop in qbasic?write the syntax for FOR nested loop.

Answers

Answered by shivanshu14
14
the nested loop means to follow or repeat the executed line
Answered by swapnadeep36
20

Answer:

Syntax of for..next in nested loop :

For (counter-variable)=start to end [STEP]             {outer loop}

For (counter-variable)=start to end[STEP]               {inner loop}

Statement[BLOCK]                                                {inner_loop}

Next (counter-variable)                                           {inner loop}            

Statement[BLOCK]                                               {outer_loop}

Next(counter-variable)                                          {outer loop}      

The variable used in the above  For …Next loop is called ‘loop control variable’.

Explanation:

loop within another loop is called 'nested loop'.

Note:outer loop begins first but ends last,whereas inner loop begins last but end first.

give it a like,bye friends!!!                                                                            Swapnadeep chakraborty

16.12.2019

Similar questions