Dze je subor www.TrSek.com/cover/ghostix/trojuholnik2.pas{ TROJUHOLNIK2.PAS Copyright (c) ghostix }
{ Program vykresli trojuholnik z hviezdiciek. Pouzita procedura. }
{ }
{ Author: Ghostix }
{ Date : 18.11.2007 http://www.trsek.com }
program trojuholnik;
uses crt;
var x,i,j,r:integer;
procedure vypis (s:integer);
begin
if (x<1) then
writeln('Pocet vrstiev musi byt vatsi nez 0!')
else
begin
r:=1;
for i:=1 to s do
begin
for j:=1 to r do
write('*');
r:=r+1;
s:=s-1;
writeln;
end;
end;
end;
begin
clrscr;
write('Zadajte velkost podstavy: ');
readln(x);
vypis(x);
readln;
end.