program grafika;
uses crt, graph;
var gd, gm, x, y, r: integer;
begin
Initgraph (gd, gm, ”);
line (900,0,900,700);
setcolor(14);
x:=200;
y:=400;
r:=25;
circle(x,y,r);
while x<= 925 do
begin
delay(1);
setcolor(0);
circle(x,y,r);
setcolor(14);
x:=x+5;
circle(x,y,r);
end;
Readln;
Closegraph;
end.
program grafika;
uses crt, graph;
var gd, gm,x,i,metimas,y: integer;
begin
randomize;
Initgraph (gd, gm, ”);
setcolor(15);
x:=450;
y:=350;
circle(x,y,50);
for i:=1 to 100 do
begin
delay(250);
setcolor(0);
circle(x,y,50);
metimas:=random(4)+1;
if metimas= 1 then x:=x-10;
if metimas= 2 then x:=x+10;
if metimas= 3 then y:=y-10;
if metimas= 4 then y:=y+10;
setcolor(15);
circle(x,y,50);
end;
Readln;
Closegraph;
end.
program grafika;
uses crt, graph;
var gd, gm,x,i,metimas,y,kryptis: integer;
begin
randomize;
Initgraph (gd, gm, ”);
setcolor(15);
x:=500;
y:=350;
circle(x,y,50);
line (100,0,100,700);
line (900,0,900,700);
kryptis:=1;
for i:=1 to 5000 do
begin
delay(10);
setcolor(0);
circle(x,y,50);
if (kryptis=1) and (x=850) then
begin
kryptis:=0;
x:=x-10;
end;
if(kryptis=0) and (x>150) then
begin
kryptis:=0;
x:=x-10;
end;
if (kryptis=0) and (x<=150) then
begin
kryptis:=1;
x:=x+10;
end;
setcolor(14);
circle(x,y,50);
end;
Readln;
Closegraph;
end.
program grafika;
uses crt, graph;
var gd, gm,x,y,kryptis,i: integer;
begin
Initgraph (gd, gm, ”);
setcolor(15);
x:=450;
y:=350;
circle(x,y,50);
line(100,0,100,700);
line(900,0,900,700);
kryptis:=1;
for i := 1 to 5000 do
begin
delay(20);
setcolor(0);
circle(x,y,50);
if ( kryptis=1) and (x<850)then
begin
kryptis:=1;
x:=x+10;
end;
if(kryptis=1) and (x>=850)then
begin
kryptis:=0;
x:=x-10;
end;
if(kryptis=0) and (x>150) then
begin
kryptis:=0;
x:=x-10;
end;
if(kryptis=0) and (x<=150)then
begin
kryptis:=1;
x:=x+10;
end;
setcolor(14);
circle(x,y,50);
end;
Readln;
Closegraph;
end.
February 22nd, 2010 at 6:29 am
program grafika;
uses crt, graph;
var gd, gm, x, y, r: integer;
begin
Initgraph (gd, gm, ”);
line (900,0,900,700);
setcolor(14);
x:=200;
y:=400;
r:=25;
circle(x,y,r);
while x<= 925 do
begin
delay(1);
setcolor(0);
circle(x,y,r);
setcolor(14);
x:=x+5;
circle(x,y,r);
end;
Readln;
Closegraph;
end.
March 15th, 2010 at 6:42 am
program grafika;
uses crt, graph;
var gd, gm, x, y, x1, y1: integer;
begin
Initgraph (gd, gm, ”);
randomize;
setbkcolor(15);
cleardevice;
setcolor(16);
settextstyle(1,0,3);
outtextxy(450,100, ‘Pac-Man’);
setcolor(random(16));
setfillstyle(1,14);
x:=150;
y:=350;
pieslice(x,y,40,320,100);
setcolor(random(16));
setfillstyle(random(11),random(16));
fillellipse(x+10,y-50,20,15);
setcolor(random(16));
x1:=400;
y1:=350;
setlinestyle(0,0,3);
circle(x1,y1,random(11)+10);
delay(50);
Readln;
Closegraph;
end.
March 22nd, 2010 at 6:28 am
program grafika;
uses crt, graph;
var gd, gm, x, y, x1, y1, i: integer;
begin
Initgraph (gd, gm, ”);
randomize;
setbkcolor(15);
cleardevice;
setcolor(16);
settextstyle(1,0,3);
outtextxy(450,100, ‘Pac-Man’);
setcolor(random(16));
setfillstyle(1,14);
x:=150;
y:=350;
pieslice(x,y,40,320,100);
setcolor(random(16));
setfillstyle(random(11),random(16));
fillellipse(x+10,y-50,20,15);
setcolor(random(16));
x1:=400;
y1:=350;
setlinestyle(0,0,3);
circle(x1,y1,random(11)+10);
for i:=1 to 120 do
begin
delay(100);
setcolor(15);
setfillstyle(1,15);
pieslice(x,y,40,320,100);
fillellipse(x1,y1,20,20);
setcolor(random(16));
setfillstyle(1,14);
x:=x+5;
pieslice(x,y,40,320,100);
setcolor(random(16));
setfillstyle(random(11),random(16));
fillellipse(x+10,y-50,20,15);
setcolor(random(16));
x1:=x1+3;
setlinestyle(0,0,3);
circle(x1,y1,random(11)+10);
delay(100);
setcolor(15);
setfillstyle(1,15);
pieslice(x,y,40,320,100);
fillellipse(x1,y1,20,20);
end;
Readln;
Closegraph;
end.
April 19th, 2010 at 5:29 am
program grafika;
uses crt, graph;
var gd, gm, x1, y1, x2, y2, spalva: integer;
begin
Initgraph (gd, gm, ”);
spalva:=4;
setfillstyle(1,spalva);
x1:=100;
x2:=200;
y1:=300;
y2:=500;
bar(x1,y1,x2,y2);
while x2<1000 do
begin
delay(25);
setcolor(14);
line(500,0,500,700);
setfillstyle(1,0);
bar(x1,y1,x2,y2);
x1:=x1+5;
x2:=x2+5;
if x1<500 then spalva:=4
else spalva:=2;
setfillstyle(1,spalva);
bar(x1,y1,x2,y2);
end;
Readln;
Closegraph;
end.
April 21st, 2010 at 6:32 pm
program grafika;
uses crt, graph;
var gd, gm, x, y, x2, y2, i: integer;
begin
Initgraph (gd, gm, ”);
randomize;
setbkcolor (15);
cleardevice;
setcolor (16);
setfillstyle (1, 14);
x := 500;
y := 400;
fillellipse (x, y, 100, 30);
setfillstyle (1, 1);
fillellipse (x, y-15, 75, 20);
setfillstyle (1, 4);
fillellipse (x, y-25, 20, 20);
setcolor (16);
setfillstyle (1, 13);
x2 := 500;
y2 := 600;
fillellipse (x2, y2, 75, 20);
setfillstyle (1, 4);
fillellipse (x2, y2-25, 20, 20);
for i:=1 to 80 do
begin
delay(10);
setcolor (15);
setfillstyle (1, 15);
fillellipse (x, y, 100, 30);
setfillstyle (1, 15);
fillellipse (x, y-15, 75, 20);
setfillstyle (1, 15);
fillellipse (x, y-25, 20, 20);
setcolor (15);
setfillstyle (1, 15);
fillellipse (x2, y2, 75, 20);
setfillstyle (1, 15);
fillellipse (x2, y2-25, 20, 20);
setcolor (16);
setfillstyle (1, 14);
y := y+4;
fillellipse (x, y, 100, 30);
setfillstyle (1, 1);
fillellipse (x, y-15, 75, 20);
setfillstyle (1, 4);
fillellipse (x, y-25, 20, 20);
setcolor (16);
setfillstyle (1, 13);
y2 := y2+2;
fillellipse (x2, y2, 75, 20);
setfillstyle (1, 4);
fillellipse (x2, y2-25, 20, 20);
end;
Readln;
Closegraph;
end.
April 26th, 2010 at 5:33 am
program grafika;
uses crt, graph;
var gd, gm,x,i,metimas,y: integer;
begin
randomize;
Initgraph (gd, gm, ”);
setcolor(15);
x:=450;
y:=350;
circle(x,y,50);
for i:=1 to 100 do
begin
delay(250);
setcolor(0);
circle(x,y,50);
metimas:=random(4)+1;
if metimas= 1 then x:=x-10;
if metimas= 2 then x:=x+10;
if metimas= 3 then y:=y-10;
if metimas= 4 then y:=y+10;
setcolor(15);
circle(x,y,50);
end;
Readln;
Closegraph;
end.
May 3rd, 2010 at 5:40 am
program grafika;
uses crt, graph;
var gd, gm,x,i,metimas,y,kryptis: integer;
begin
randomize;
Initgraph (gd, gm, ”);
setcolor(15);
x:=500;
y:=350;
circle(x,y,50);
line (100,0,100,700);
line (900,0,900,700);
kryptis:=1;
for i:=1 to 5000 do
begin
delay(10);
setcolor(0);
circle(x,y,50);
if (kryptis=1) and (x=850) then
begin
kryptis:=0;
x:=x-10;
end;
if(kryptis=0) and (x>150) then
begin
kryptis:=0;
x:=x-10;
end;
if (kryptis=0) and (x<=150) then
begin
kryptis:=1;
x:=x+10;
end;
setcolor(14);
circle(x,y,50);
end;
Readln;
Closegraph;
end.
May 16th, 2010 at 6:22 pm
program grafika;
uses crt, graph;
var gd, gm,x,y,kryptis,i: integer;
begin
Initgraph (gd, gm, ”);
setcolor(15);
x:=450;
y:=350;
circle(x,y,50);
line(100,0,100,700);
line(900,0,900,700);
kryptis:=1;
for i := 1 to 5000 do
begin
delay(20);
setcolor(0);
circle(x,y,50);
if ( kryptis=1) and (x<850)then
begin
kryptis:=1;
x:=x+10;
end;
if(kryptis=1) and (x>=850)then
begin
kryptis:=0;
x:=x-10;
end;
if(kryptis=0) and (x>150) then
begin
kryptis:=0;
x:=x-10;
end;
if(kryptis=0) and (x<=150)then
begin
kryptis:=1;
x:=x+10;
end;
setcolor(14);
circle(x,y,50);
end;
Readln;
Closegraph;
end.