What is the function and syntax of DO ….. LOOP WHILE statement? (Qbasic)

What is the function and syntax of DO ….. LOOP WHILE statement?
  • To execute a function of statements in a loop as long as a given condition is true.
        Syntax:
            DO
                statements
            LOOP WHILE (condition)
       
    Example:
    REM a program to print series from 1 to 10
  • CLS
    c = 1
    DO
        PRINT c
        c = c + 1
    LOOP WHILE c <= 10
    END

Share :

Twitter
Back To Top

facebook main

counter

Powered by Blogger.