12 lines
327 B
Plaintext
12 lines
327 B
Plaintext
/* Auxiliar function */
|
|
aux_table(n,k):=append([k],makelist(0,i,1,k-1),makelist(k*i,i,k,n))$
|
|
|
|
/* Function to construct the formatted table */
|
|
table_mult(n):=block(
|
|
append([makelist(i,i,0,n)],makelist(aux_table(n,k),k,1,n)),
|
|
makelist(at(%%[i],0=""),i,2,length(%%)),
|
|
table_form(%%))$
|
|
|
|
/* Test case */
|
|
table_mult(12);
|