94.5k views
0 votes
Write a program to print all odd numbers between 20 and 50(Qbasic)​

User Tim Nuwin
by
3.7k points

1 Answer

2 votes

Source Code:

total = 0

FOR x = 20 TO 50 STEP 2
total = total + x
NEXT x

PRINT "Total=";total

User PatS
by
3.2k points