Está en la página 1de 2

PROGRAM uy; uses crt,graph;

VAR mode,mode2:integer;
x,x2,y,y2,n:word;
BEGIN
mode:=detect;
initgraph(mode,mode2,»);
{grafik rejim }
x2:=getmaxX div 2; {ekranning yarim o’lchami}
y2:=getmaxY div 2;
x:=getmaxX; {ekranning to’liq qismi}
y:=getmaxY; setbkcolor(9);
{yo’l 50} setcolor(8);
line(0,y-50,x,y-50);
setfillstyle(1,6); floodfill(5,y-40,8);
{yo’l balandligi Y=(y-50)}
setfillstyle(1,14); {quyosh}
setcolor(14);
pieslice(0,0,270,360,70); setfillstyle(1,5);
setcolor(6); {uyning quyi qismi}
{Х=(х2+90)} {kengligi=90}
rectangle(x2,y-50-150,x2+90,y-51); {Y=(y-200)}
{balandligi=100}
floodfill(x2+5,y-60,6); setfillstyle(1,4); {tom}
{Y=(y-251)} {balandlik=50}
line(x2,y-50-151,x2+45,y-50-151-50);
line(x2+45,y-251,x2+90,y-199);
floodfill(x2+45,y-249,6); setfillstyle(1,13);
{oyna} rectangle(x2+45-20,y-160,x2+45+20,y-100);
line(x2+45,y-130-30,x2+45,y-130+30);
line(x2+45-20,y-130,x2+45+20,y-130);
floodfill(x2+45-15,y-155,6); floodfill(x2+45+15,y-155,6);
floodfill(x2+45-15,y-105,6); floodfill(x2+45+15,y-105,6);
setfillstyle(1,10); {daraxt 1}
setcolor(3); arc(50,y-51-100,0,360,45);
floodfill(50,y-150,3);
setcolor(6); line(50,y-51,50,y-51-100);
setfillstyle(1,10); {daraxt 2}
setcolor(3); arc(170,y-51-100,0,360,45);
floodfill(170,y-150,3); setcolor(6);
line(170,y-51,170,y-51-100); setfillstyle(1,10);
{daraxt 2} setcolor(3);
arc(x-140,y-51-100,0,360,45);
floodfill(x-140,y-150,3); setcolor(6);
line(x-140,y-51,x-140,y-51-100); delay(2000);
{fon 2000 millisekundda ozgaradi}
setbkcolor(7); delay(2000);
setbkcolor(8); delay(1000);
randomize; for n:=1 to 300 do
begin {yulduzlarni chiqishi}
putpixel(random(x),random(150),14);
delay(30); end; {yozuv}
settextjustify(1,1); settextstyle(0,0,5);
setfillstyle(0,0); setcolor(2);
outtextxy(320,170, ‘Bu tun…’); readkey;
closegraph; {grafik rejimni o’chirish}
end.

También podría gustarte