lunlumo #7581(2008/09/06 09:42 GMT) [ Pascal ] Rating0/0=0.00
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
program Pyramid; var i :Integer; height :Integer; error :Word; procedure WriteStep(step:Integer); var j :Integer; begin for j := -height + 1 to height - 1 do if Abs(j) <= height - step then Write('*') else Write(' '); WriteLn end; begin Val(ParamStr(1),height,error); if error <> 0 then WriteLn('invalid arguments') else for i := height downto 1 do WriteStep(i) end.
Rating0/0=0.00-0+
[ reply ]
lunlumo #7581() [ Pascal ] Rating0/0=0.00
Rating0/0=0.00-0+
[ reply ]