'IT'S KINDA DYNAMIC, THIS AND MORE CAN BE ACHIEVED WITH QBASIC
DECLARE SUB BRAND ()
CLS
SCREEN 12
'PROGRAM TO PRODUCE MULTIPLICATION TABLE
INPUT "INPUT THE THE DESIRED WIDTH OF THE TABLE"; X
INPUT "INPUT THE THE DESIRED LENGTH OF THE TABLE"; Y
SX = 6
SY = 15
CLS
CALL BRAND
CLS
PRINT
FOR A = 1 TO Y
FOR B = 1 TO X
COLOR 14
PRINT USING "###"; A * B;
PRINT " ";
NEXT
PRINT
NEXT
LINE (SX - 5, SY - 5)-(31.5 * X + 5, (15.89 * Y + 20)), 13, B
LINE (SX, SY)-(31.5 * X, (15.89 * Y) + 15), 15, B
'THIS FIRST LOOP DRAWS THE FIRST TWO VERTICAL LINES
FOR LX = 37.5 TO (31.5 * 3) STEP 31.5
LINE (LX, SY)-(LX, (15.89 * Y) + SY), 9
NEXT
'THIS DRAWS THE REMAINING VETICAL LINES
FOR LX2 = 94.5 TO (31.5 * X) STEP 31.5
LINE (LX2, SY)-(LX2, (15.89 * Y) + SY), 10
NEXT
'THIS LOOP DRAWS ALL THE HORIZONTAL LINES
FOR LY = 30.89 TO (15.89 * Y) STEP 15.89
LINE (SX, LY)-(31.5 * X, LY), 3
NEXT
END
SUB BRAND
PRINT
PRINT
PRINT
PRINT " MULTIPLICATION TABLE PROGRAM"
PRINT " COMPLETED BY"
COLOR 9
PRINT " IKFORMULA "
SLEEP 2
END SUB
No comments:
Post a Comment
Please comment if there's anything you feel can be added or if you have any questions. Thanks.