Given a number and either "+" or "*", return an addition or multiplication table with the dimensions of that number.
Specifications
- The input will be formatted as
dimension, operation
. - The program should not return anything if the operation input is not + or *.
- The program should not return anything if the dimension input is less than 1.
(4,*):
1 2 3 4
2 4 6 8
3 6 9 12
4 8 1216
(4,+):
1234
2456
3567
4678
The spaces between the numbers in the table should be equal to one less than the number of digits in dimension^2
for multiplication, and for addition one less than the number of digits in dimension * 2
.