Pages

Monday, November 2, 2015

BASIC Program to Create Multiplication Table

This program displays the times table from 1 to 5 in rows and columns.

10    CLS
20    FOR I= 1  TO 5 STEP 1
30     Print using "###"; i;
40    Next i
50     For j= 2 to 10 step 2
60     Print using "###"; j;
70     Next j
80     For k = 3 to 15 step 3
90        Print using "###"; k;
100    Next k
110   For m = 4 to 20 step 4
120      Print using "###"; m;
130    Next m
140     End

You can follow the logic above to create the multiplication table of any size.