158k views
1 vote
Write a qbasic program using FOR and NEXT command to compute the multiples of 7


1 Answer

4 votes

Here's a QBasic program using FOR and NEXT commands to compute the multiples of 7:

FOR i = 1 TO 10

PRINT 7 * i

NEXT i

This program will print out the multiples of 7 from 7 to 70, with each multiple on a new line. You can change the value of the TO parameter in the FOR statement to generate more or fewer multiples, depending on your needs.

User Dhaval Gevariya
by
8.0k points