Minimum number of cells after, before, above and below NxN squares: Difference between revisions

→‎{{header|ALGOL W}}: Added missing declarations
(→‎{{header|ALGOL W}}: Ensure all cell counts are printed in the same width.)
(→‎{{header|ALGOL W}}: Added missing declarations)
Line 117:
procedure printMinCells ( integer value n ) ;
begin
integer w, v;
w := 1; v := ( ( n - ( if odd( n ) then 1 else 0 ) ) div 2 );
while v > 9 do begin v := v div 10; w := w + 1 end;
3,044

edits