Magic constant: Difference between revisions

Content added Content deleted
Line 45: Line 45:
Uses ALGOL 68G's LONG LONG INT whose default precision is large enough to cope with 10^20.
Uses ALGOL 68G's LONG LONG INT whose default precision is large enough to cope with 10^20.
<lang algol68>BEGIN # find some magic constants - the row, column and diagonal sums of a magin square #
<lang algol68>BEGIN # find some magic constants - the row, column and diagonal sums of a magin square #
# translation of the Free Basic sample with the Julia inverse function #
# translation of the Free Basic sample with the Julia/Wren inverse function #
# returns the magic constant of a magic square of order n #
# returns the magic constant of a magic square of order n #
PROC a = ( INT n )LONG LONG INT:
PROC a = ( INT n )LONG LONG INT: