Magic squares of doubly even order: Difference between revisions
Content deleted Content added
m simplified t/mod |
|||
Line 1,507:
=={{header|Phix}}==
{{trans|C++}}
<lang Phix>constant t = {{1,
{
{0,
{
function magic_square(integer n)
Line 1,518:
for r=1 to n do
for c=1 to n do
square[r,c] = iff(t[mod(r
i += 1
end for
Line 1,524:
return square
end function
procedure check(sequence sq)
integer n = length(sq)
|