|I need a properly spaced Multiplication Table using For,Next loops that I can easily whip up on my QBasic. It needs to use If/Then/Elses for the spacing issue. Multiplication table of 10x10.|
It needs to be able to evenly space between single digit, double digit, and triple digit numbers.
I have somewhat the body for it, but I can't figure out the spacing.
Typing from memory here...
FOR J = 1 TO 10
FOR I = 1 TO 10
IF X * Y < 10 THEN
PRINT X * Y; " "; (<-- 2 spaces)
IF X * Y > 10 AND X * Y < 100 THEN
PRINT X * Y; " "; (<-- 1 space)
PRINT X * Y;
Please tell me how to correctly code this, and how to fix the spacing issue!!!
If you could type what your program looked like with the For,Next and If/Then/Elses, that would be greatly appreciated.
Doesn't count indentations on the loops, but they are there!!!