A program to input a number and print the multiplication table of the same number upto 10th terms. (Qbasic Code)

A program to input a number and print the multiplication table of the same number upto 10th terms. (Qbasic Code)

Using FOR .... NEXT
  • CLS
    INPUT "Enter any number"; n
    FOR i = 1 TO 10
        a = n * i
        PRINT n; "x"; i; "="; a
    NEXT i
    END


Using WHILE .... WEND
  • CLS
    INPUT "Enter any number"; n
    i = 1
    WHILE i <= 10
        a = n * i
        PRINT n; "x"; i; "="; a
        i = i + 1
    WEND
    END

Share :

Twitter
Back To Top

facebook main

counter

Powered by Blogger.