pastebin - collaborative debugging

pastebin is a collaborative debugging tool allowing you to share and modify code snippets while chatting on IRC, IM or a message board.

This site is developed to XHTML and CSS2 W3C standards. If you see this paragraph, your browser does not support those standards and you need to upgrade. Visit WaSP for a variety of options.

 >  > Запись оставлена Гость 02.05.2024 в 14:16 Получить справку

Запись оставлена Гость 02.05.2024 в 14:16
запустить | скачать | новая запись

  1. uses crt,graph;
  2. var a,b,bb,x,y,i,jx,jy:integer;
  3.     xx,yy:array[1..1000] of integer;
  4.     c:char;
  5.     n:boolean;
  6. begin
  7.      initgraph(a,b,'');
  8.      randomize;
  9.      a:=1;
  10.      i:=1;
  11.      n:=false;
  12.      x:=100;
  13.      y:=240;
  14.      rectangle(0,0,639,479);
  15.      repeat
  16.      jx:=random(640);
  17.      jy:=random(480);
  18.      if getpixel(jx,jy)=0 then begin
  19.      for i:=-3 to 3 do begin
  20.      putpixel(jx+i, jy, 14);
  21.      putpixel(jx,jy+i,14);
  22.      end;
  23.      a:=1; end else a:=0;
  24.      until a=1;
  25.      i:=1;
  26.      repeat
  27.      a:=a+1;
  28.      if a=150*i+1 then a:=1;
  29.      if n=false then x:=x+1;
  30.      if ord(c)=72 then y:=y-1;
  31.      if ord(c)=75 then x:=x-1;
  32.      if ord(c)=77 then x:=x+1;
  33.      if ord(c)=80 then y:=y+1;
  34.      if getpixel(x,y)=15 then c:='x';
  35.      if getpixel(x,y)=14 then begin
  36.      for b:=y-10 to y+10 do begin
  37.      for bb:=x-10 to x+10 do
  38.      if getpixel(bb,b)=14 then putpixel(bb,b,0);
  39.      end;
  40.      repeat
  41.      jx:=random(640);
  42.      jy:=random(480);
  43.      if getpixel(jx,jy)=0 then begin
  44.      for b:=-3 to 3 do begin
  45.      putpixel(jx+b, jy, 14);
  46.      putpixel(jx,jy+b,14);
  47.      end;
  48.      b:=1; end else b:=0;
  49.      until b=1;
  50.      i:=i+1;
  51.      end;
  52.      putpixel(x,y,15);
  53.      delay(15);
  54.      putpixel(xx[a],yy[a],0);
  55.      xx[a]:=x;
  56.      yy[a]:=y;
  57.      if keypressed then n:=true;
  58.      if keypressed then c:=readkey;
  59.      until (c='x') or (i=10);
  60.      if c='x' then begin
  61.      settextstyle(1,0,8);
  62.      setcolor(9);
  63.      outtextxy(150,200,'THE END...');
  64.      end;
  65.      if i=10 then begin
  66.      setcolor(10);
  67.      settextstyle(3,0,8);
  68.      outtextxy(150,200,'CONGRATS!');
  69.      end;
  70.      delay(500);
  71.      readkey;
  72.  
  73.      closegraph;
  74. end.

Отправка исправлений и поправок. (cоздать новую запись)
После отправки поправок вы сможете посмотреть различия между старой и новой записью.

Использовать подсветку синтаксиса
В текущей реализации JS-DOS Read/ReadLn работают только при подключенном модуле Crt! Для подсветки отдельных строк используйте для них префикс @@


картинка


Запомнить мои настройки