Minimum number of cells after, before, above and below NxN squares: Difference between revisions
Minimum number of cells after, before, above and below NxN squares (view source)
Revision as of 18:08, 4 August 2021
, 2 years ago→{{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;
|