Embed presentation
Downloaded 21 times









Loops are used to repeat a block of code a fixed number of times. The document introduces for-next loops in QBASIC, which allow printing numbers from 1 to 100 with a single loop instead of writing PRINT statements for each number. It explains that a for-next loop has an initial value, final value, and increment step to control the loop variable and determine when to start, stop, and increment the counter each iteration. An example prints even numbers from 2 to 20 using a step size of 2 to skip odd numbers between iterations.







