Site Loader

T is the variable to store the result and print it. WHILE num <> 0 r = num MOD 10 s = s * 10 + r num = INT(num / 10) WEND PRINT "the reversed number is "; s END. LOOP. . QBT9_6.BAS The loops are the While, Do Loop, and For loop. http://www.SchoolFreeware.com There are three types of loops for QBasic. When it gets to the Loop it goes back to the Do and tests condition again. Unknown March 1, 2017 at 7:54 AM. Warning Make sure that the loop has a condition that will end the loop. CLS. Here in this program we that variable b as base and h as height. WHILE x < 3 x = x + 1 PRINT x WEND DO x = x - 1 PRINT x LOOP UNTIL x <= 0.