Magic squares of odd order: Difference between revisions
Content added Content deleted
m (→{{header|Phix}}: pp_StrFmt tweaks) |
|||
Line 3,121: | Line 3,121: | ||
printf(1,"maqic square of order %d, sum: %d\n", {i,sum(square[i])}) |
printf(1,"maqic square of order %d, sum: %d\n", {i,sum(square[i])}) |
||
string fmt = sprintf("%%%dd",length(sprintf("%d",i*i))) |
string fmt = sprintf("%%%dd",length(sprintf("%d",i*i))) |
||
pp(square,{pp_Nest,1,pp_IntFmt,fmt,pp_StrFmt, |
pp(square,{pp_Nest,1,pp_IntFmt,fmt,pp_StrFmt,3,pp_IntCh,false,pp_Pause,0}) |
||
check(square) |
check(square) |
||
end for</lang> |
end for</lang> |