To Display Natural Numbers From 1 to 10 (Qbasic Code)

To Display Natural Numbers From 1 to 10 (Qbasic Code)
Using FOR ...... NEXT
  • CLS
    FOR i = 1 TO 10 STEP 1
        PRINT i
    NEXT i
    END
Using WHILE .....  WEND
  •  CLS
    c = 1
    WHILE c <= 10
        PRINT c
        c = c + 1
    WEND
    END
Using DO WHILE ..... LOOP
  • CLS
    c = 1
    DO WHILE c <= 10
        PRINT c
        c = c + 1
    LOOP
    END

Share :

Twitter

Random Posts

Back To Top

facebook main

counter

Powered by Blogger.