WHILE num <> 0 r = num MOD 10 s = s * 10 + r num = INT(num / 10) WEND PRINT "the reversed number is "; s END. Control then returns to the While statement and condition is again checked. Reply Delete. Syntax WHILE condition WEND. January 13, 2019 do loop in qbasic, for loop in qbasic, looping statements in qbasic, qbasic for class 10, qbasic for class 9, QBASIC Looping statements, qbasic tutorials, while loop in qbasic The process of repeating or doing same task many times until the given condition is true is called looping or iteration. document.write("The Current Value of the Counter is : " & Counter) document.write("

") Wend ' While loop exits if Counter Value becomes 15. 2. The loops are the While, Do Loop, and For loop. What is the function and syntax of WHILE ….. WEND statement? Reading some answers in stackoverflow I saw a while wend loop. CLS Unknown March 1, … ; EXIT WHILE can be used for emergency exits from the loop in QB64 only. Since x was being incremented inside the loop, the loop does not repeat again after the "x = x + 1" assignment that set x to 3. 1. The process of repeating or doing same task many times until the given condition is true is called looping or iteration. Warning Make sure that the loop has a condition that will end the loop. The loop here is pretty obvious, the code within the loop will execute as long as the WHILE a <> b condition becomes true. SUB re… QBasic/Sample Programs. It allows a specified group of statements to be executed a certain number of times while certain condition is true. While Loop SyntaxWHILE [condition] Example. To execute a function of statements in a loop as long as a given condition is true. CLS INPUT "enter any number "; num. Counter = Counter + 1 ' Increment Counter.    [Statement Block] QBasic 1.1 is found within OldDOS.exe. a=0. While...Wend loops can be nested to any level. Here in this program we that variable b as base and h as height. And , the WHILE loop has a print statement with the semicolon at the end. If there is not a condition to end the loop, the computer will be sent through an infinite loop. Counter = Counter + 1 ' Increment Counter. Array is a variable which stores different values of the same data type. The loops are the While, Do Loop, and For loop. WARNINGMake sure that the loop has a condition that will end the loop. I did some testing (code below) and both seem to give me the same results. Syntax: WHILE (condition) statements WEND Example: REM a program to print series from 1 to 10; CLS c = 1 WHILE c <= 10 PRINT c c = c + 1 WEND END The loops are the While, Do Loop, and For loop. DO WHILE INKEY$<> "": LOOP ' checks evaluation before running loop codeDO: LOOP WHILE INKEY$ <> "" ' checks evaluation after one run of loop code Example 2:Using UNTIL to clear the keyboard buffer. QBasic.Net - www.qbasic.net If condition evaluates to true, instruction-list is executed, otherwise the control is transferred to instructions immediately after WEND.