Program vykreslí pyramídu
Delphi & Pascal (česká wiki)
Kategorija: KMP (Programy mladňakoch
Zrobil: ghostix
Program: Pyramida.pas
Subor exe: Pyramida.exe
Mušiš mac: Egavga.bgi
Zrobil: ghostix
Program: Pyramida.pas
Subor exe: Pyramida.exe
Mušiš mac: Egavga.bgi
Program vykreslí pyramídu.
{ PYRAMIDA.PAS Copyright (c) ghostix } { Program vykresli pyramidu. } { } { Author: Ghostix } { Date : 19.12.2007 http://www.trsek.com } program pyramida; uses graph; var j,i,gd,gm:integer; procedure grafika; begin gd:=detect; initgraph(gd,gm,''); end; procedure stvorec; begin for i:=1 to 8 do begin line(i*40-40,320,i*40-40,i*40-40); rectangle(0,i*40-40,i*40,i*40); end; for i:=0 to 5 do begin for j:=0 to 5 do begin setfillstyle(1,blue); floodfill(j*80+1,i*80+1,white); end; end; for i:=0 to 4 do begin for j:=0 to 4 do begin setfillstyle(1,blue); floodfill(j*80+41,i*80+41,white); end; end; setfillstyle(1,black); floodfill(340,340,white); end; begin grafika; stvorec; readln; closegraph; end.