Mam problem z narysowaniem choinki, proszę o napisanie programu, który to wykona. Językiem jest PASCAL.
program choinka;var i, j, w : Integer;begin Write('Ile wierszy? '); ReadLn(w); for i:=1 to w do begin for j:=1 to w + i - 1 do if j >= w - (i - 1) then Write('*') else Write(' '); WriteLn; end;end.
" Life is not a problem to be solved but a reality to be experienced! "
© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.
program choinka;
var i, j, w : Integer;
begin
Write('Ile wierszy? ');
ReadLn(w);
for i:=1 to w do
begin
for j:=1 to w + i - 1 do
if j >= w - (i - 1) then
Write('*')
else
Write(' ');
WriteLn;
end;
end.