Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program Biatlons;
- USES CRT,GRAPH,math;
- var x,x1,x2,x3,x4,x5,y,y1,y2,y3,y4,y5,M1,M2,M3,M4,M5:integer;
- START,BL,T1,SA ,P1,P2,P3,P4,P5,TX1,TY1,TX2,TY2,TX3,TY3,TX4,TY4,TX5,TY5:Integer; d,m:SMALLINT;
- BEGIN
- InitGraph(d,m,''); SetBkColor(123); ClearDevice; SetColor(Blue); SetFillSTYLE(1,16); line(150,250,450,250); line(150,250,150,900); line(150,900,1050,900); line(1050,900,1050,250); line(1050,250,700,250); line(200,300,450,300); line(200,300,200,850); line(200,850,1000,850); line(1000,850,1000,300); line(700,300,1000,300); line(500,300,650,300); line(500,300,500,700); line(450,300,450,750); line(450,750,700,750); line(500,700,650,700); line(650,700,650,550); line(700,750,700,600); line(700,600,900,600); line(650,550,850,550); line(850,550,850,400); line(900,600,900,350); line(900,350,700,350); line(700,350,700,300); line(850,400,650,400); line(650,400,650,300); circle(525,125,10);
- circle(550,125,10); circle(575,125,10); circle(600,125,10); circle(625,125,10); circle(175,275,5); ///Tribūnas
- ///rectangle(25,150,75,950); circle(50,175,5); setfillstyle(5,11); fillEllipse(50,175, 10, 10); circle(50,225,5); setfillstyle(4,10); fillEllipse(50,225, 10, 10); circle(50,275,5); setfillstyle(3,12); fillEllipse(50,275, 10, 10); circle(50,325,5); setfillstyle(2,13); fillEllipse(50,325, 10, 10); circle(50,375,5); setfillstyle(6,6); fillEllipse(50,375, 10, 10); circle(50,425,5); setfillstyle(1,8); fillEllipse(50,425, 10, 10); circle(50,475,5); setfillstyle(2,3); fillEllipse(50,475, 10, 10); circle(50,525,5); setfillstyle(7,2); fillEllipse(50,525, 10, 10); circle(50,575,5); setfillstyle(3,9); fillEllipse(50,575, 10, 10); circle(50,625,5); setfillstyle(6,1); fillEllipse(50,625, 10, 10); circle(50,675,5); setfillstyle(2,7); fillEllipse(50,675, 10, 10); circle(50,725,5); setfillstyle(8,5); fillEllipse(50,725, 10, 10); circle(50,775,5); setfillstyle(5,15);
- fillEllipse(50,775, 10, 10); circle(50,825,5); setfillstyle(2,12); fillEllipse(50,825, 10, 10); circle(50,875,5); setfillstyle(4,7); fillEllipse(50,875, 10, 10); circle(50,925,5); setfillstyle(6,6); fillEllipse(50,925, 10, 10); rectangle(75,950,125,150); circle(100,175,5); setfillstyle(4,16); fillEllipse(100,175, 10, 10); circle(100,225,5); setfillstyle(5,13); fillEllipse(100,225, 10, 10); circle(100,275,5); setfillstyle(3,12); fillEllipse(100,275, 10, 10); circle(100,325,5); setfillstyle(2,13); fillEllipse(100,325, 10, 10); circle(100,375,5); setfillstyle(6,11); fillEllipse(100,375, 10, 10); circle(100,425,5); setfillstyle(2,4); fillEllipse(100,425, 10, 10); circle(100,475,5); setfillstyle(5,7); fillEllipse(100,475, 10, 10); circle(100,525,5); setfillstyle(4,8); fillEllipse(100,525, 10, 10); circle(100,575,5); setfillstyle(2,8); fillEllipse(100,575, 10, 10); circle(100,625,5); setfillstyle(5,15); fillEllipse(100,625, 10, 10); circle(100,675,5); setfillstyle(4,16); fillEllipse(100,675, 10, 10); circle(100,725,5); setfillstyle(5,11);
- fillEllipse(100,725, 10, 10); circle(100,775,5); setfillstyle(1,9); fillEllipse(100,775, 10, 10); circle(100,825,5); setfillstyle(6,6); fillEllipse(100,825, 10, 10); circle(100,875,5); setfillstyle(4,10); fillEllipse(100,875, 10, 10); circle(100,925,5); setfillstyle(5,7); fillEllipse(100,925, 10, 10);
- ///
- Writeln(' START ? '); Readln(START);
- Begin
- ///Pārvietošanās
- x:=175;
- while(x<575)do
- begin setcolor(blue); x:=x+2; circle(x,275,5); setcolor(blue); delay(15); circle(x,275,5); end;
- y:=275; while(y>200)do
- begin setcolor(blue); y:=y-2; circle(575,y,5); setcolor(blue); delay(15); circle(575,y,5); end;
- setcolor(blue);
- circle(575,200,5);
- //Shooting
- Writeln(' KOORDINATS 1-10(X),1-10(Y) ! ');
- WRITELN(' IEVADI PA VIENAM X PIRMAIS Y OTRAIS ! '); Readln(x1);
- readln(y1);
- if (x1>=1) and (x1<=10) then begin TX1:=1;
- end
- ELSE IF(x1<1) and (x1>10) then begin
- TX1:=0;
- END;
- IF (y1>=1) and (y1<=10) then begin
- TY1:=1;
- end
- ELSE IF(y1<1) and (y1>10) then begin
- TY1:=0; END; begin
- P1:= TY1+TX1;
- end;
- IF(P1=2)THEN BEGIN setfillstyle(5,8); fillEllipse(525, 125, 10, 10);
- M1:=0
- END
- ELSE IF (P1<4) THEN BEGIN
- M1:=1;
- END;
- Writeln(' KOORDINATS 11-20(X),11-20(Y) ! ');
- WRITELN(' IEVADI PA VIENAM X PIRMAIS Y OTRAIS ! '); Readln(x2);
- readln(y2);
- if (x2>=11) and (x2<=20) then begin
- TX2:=1;
- end
- ELSE IF(x2<11) and (x2>20) then begin
- TX2:=0;
- END;
- IF (y2>=11) and (y2<=20) then begin
- TY2:=1;
- end
- ELSE IF(y2<11) and (y2>20) then begin
- TY2:=0; END; begin
- P2:= TY2+TX2;
- end;
- IF(P2=2)THEN BEGIN setfillstyle(5,9); fillEllipse(550, 125, 10, 10);
- M2:=0
- END
- ELSE IF (P2<4) THEN BEGIN
- M2:=1;
- END;
- Writeln(' KOORDINATS 21-30(X),21-30(Y) ! '); Readln(x3);
- readln(y3);
- if (x3>=21) and (x3<=30) then begin
- TX3:=1;
- end
- ELSE IF(x3<21) and (x3>30) then begin
- TX3:=0;
- END;
- IF (y3>=21) and (y3<=30) then begin
- TY3:=1;
- end
- ELSE IF(y3<21) and (y3>30) then begin
- TY3:=0;
- END; begin
- P3:= TY3+TX3;
- end;
- IF(P3=2)THEN BEGIN
- setfillstyle(5,10); fillEllipse(575, 125, 10, 10); M3:=0
- END
- ELSE IF (P3<4) THEN BEGIN M3:=1;
- END;
- Writeln(' KOORDINATS 31-40(X),31-40(Y) ! ');
- WRITELN(' IEVADI PA VIENAM X PIRMAIS Y OTRAIS ! '); Readln(x4);
- readln(y4);
- if (x4>=31) and (x4<=40) then begin
- TX4:=1;
- end
- ELSE IF(x4<31) and (x4>40) then begin
- TX4:=0;
- END;
- IF (y4>=31) and (y4<=40) then begin
- TY4:=1;
- end
- ELSE IF(y4<31) and (y4>40) then begin
- TY4:=0; END;
- begin
- P4:= TY4+TX4; end;
- IF(P4=2)THEN BEGIN setfillstyle(5,11); fillEllipse(600, 125, 10, 10);
- M4:=0
- END
- ELSE IF (P4<4) THEN BEGIN
- M4:=1;
- END;
- Writeln(' KOORDINATS 41-50(X),41-50(Y) ! '); Readln(x5);
- readln(y5);
- if (x5>=41) and (x5<=50) then begin
- TX5:=1;
- end
- ELSE IF(x5<41) and (x5>50) then begin
- TX5:=0;
- END;
- IF (y5>=41) and (y5<=50) then begin
- TY5:=1;
- end
- ELSE IF(y5<41) and (y5>50) then begin
- TY5:=0;
- END; begin
- P5:= TY5+TX5;
- end;
- IF(P5=2)THEN BEGIN setfillstyle(5,12);
- fillEllipse(625, 125, 10, 10); M5:=0;
- END
- ELSE IF (P5<4) THEN BEGIN M5:=1;
- END;
- SA:=M5+M4+M3+M2+M1; y:=200;
- while(y<275)do
- begin setcolor(blue); y:=y+2; circle(575,y,5); setcolor(blue); delay(15);
- circle(575,y,5);
- end;
- if(SA>0) then begin
- for BL:=1 to SA DO begin
- x:=575; while(x<675)do begin setcolor(blue); x:=x+2; circle(x,275,5); setcolor(blue); delay(15); circle(x,275,5); end;
- Y:=275; while(y<375)do begin setcolor(blue); y:=y+2; circle(675,y,5); setcolor(blue); delay(15); circle(675,y,5); end;
- x:=675; while(x<875)do begin setcolor(blue); x:=x+2; circle(x,375,5); setcolor(blue); delay(15); circle(x,375,5); end;
- Y:=375; while(y<575)do begin setcolor(blue); y:=y+2; circle(875,y,5); setcolor(blue); delay(15); circle(875,y,5); end;
- x:=875;
- while(x>675)do begin setcolor(blue); x:=x-2; circle(x,575,5); setcolor(blue); delay(15); circle(x,575,5); end;
- Y:=575; while(y<725)do begin setcolor(blue); y:=y+2; circle(675,y,5); setcolor(blue); delay(15); circle(675,y,5); end;
- x:=675; while(x>475)do begin setcolor(blue); x:=x-2; circle(x,725,5); setcolor(blue); delay(15); circle(x,725,5); END;
- Y:=725; while(y>275)do begin setcolor(blue); y:=y-2; circle(475,y,5); setcolor(blue); delay(15); circle(475,y,5); end;
- x:=475; while(x<575)do begin setcolor(blue); x:=x+2; circle(x,275,5); setcolor(blue);
- delay(15); circle(x,275,5); end;
- END;
- x:=575; while(x<675)do
- begin setcolor(blue); x:=x+2; circle(x,275,5); setcolor(blue); delay(15); circle(x,275,5); end;
- x:=675;
- while(x<1025)do begin
- setcolor(blue); x:=x+2; circle(x,275,5); setcolor(blue); delay(15); circle(x,275,5); end;
- y:=275; while(y<875)do
- begin setcolor(blue); y:=y+2; circle(1025,y,5); setcolor(blue); delay(15); circle(1025,y,5); end;
- x:=1025; while(x>175)do
- begin setcolor(blue); x:=x-2; circle(x,875,5); setcolor(blue); delay(15); circle(x,875,5); end;
- y:=875; while(y>275)do
- begin setcolor(blue); y:=y-2; circle(175,y,5); setcolor(blue); delay(15); circle(175,y,5); end;
- end
- else if (SA=0)then begin x:=575; while(x<1025)do
- begin setcolor(blue); x:=x+2; circle(x,275,5); setcolor(blue); delay(15); circle(x,275,5); end;
- y:=275; while(y<875)do
- begin setcolor(blue); y:=y+2; circle(1025,y,5); setcolor(blue); delay(15); circle(1025,y,5); end;
- x:=1025; while(x>175)do
- begin setcolor(blue); x:=x-2; circle(x,875,5); setcolor(blue); delay(15); circle(x,875,5); end;
- y:=875; while(y>275)do
- begin setcolor(blue); y:=y-2;
- circle(175,y,5); setcolor(blue); delay(15); circle(175,y,5); end;
- setcolor(blue); circle(175,275,5);
- end; end; end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement