Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
30
Добавлен:
09.03.2016
Размер:
926 б
Скачать
program cub;
 uses graph,crt;
 var
  graphdriver,graphmode : integer;
  i,c,a,c1,c2,c3        : integer;
  aa : real;
  procedure do_it;
  procedure picture(col:word);
   begin
    setcolor(col);
    line(10,300,300,300);
    line(300,300,300,500);
    line(310,350+c2,610,450-c2);
    line(460,400,400,450);
    line(460,400,520,450);
    circle(100+c,260+c1,40);
    circle(580,397-c3,40);
   end;
   begin
    repeat
    picture(11);
      delay(13000);
    picture(5);
    if c<=240 then c:=c+a;
    if (c>=240) and (c1<150) then c1:=c1+a;
    if (c1>=56) and (c1<150) then
         begin
          aa:=aa+2.5;
          c2:=round(aa);
         end;
     if c1>=56 then c3:=c3+2*a;
   until keypressed
   end;
  begin
   graphdriver:=detect;
    clrscr;
   initgraph(graphdriver,graphmode,'c:\tp70\bgi');
   setbkcolor(5);
   c:=0; a:=2; c1:=0; aa:=0;
    do_it;
 closegraph
end.
Соседние файлы в папке graph