fork download
  1. program d;
  2. uses crt,graph;
  3. const n=11;
  4. var kosta:boolean;
  5. type
  6. Point=record
  7. x,y:integer;
  8. end;
  9. mas=array[1..n] of Point;
  10. procedure Z(x,y:integer;var m:mas;c:byte);
  11. var i:byte;
  12. begin
  13. Setcolor(c);
  14. m[1].x:=x;m[1].y:=y;
  15. m[2].x:=x+50;m[2].y:=y;
  16. m[3].x:=x+50;m[3].y:=y+5;
  17. m[4].x:=x+7;m[4].y:=y+45;
  18. m[5].x:=x+50;m[5].y:=y+45;
  19. m[6].x:=x+50;m[6].y:=y+50;
  20. m[7].x:=x;m[7].y:=y+50;
  21. m[8].x:=x;m[8].y:=y+45;
  22. m[9].x:=x+43;m[9].y:=y+5;
  23. m[10].x:=x;m[10].y:=y+5;
  24. m[11].x:=x;m[11].y:=y;
  25. moveto(m[1].x,m[1].y);
  26. for i:=1 to n do
  27. lineto(m[i].x,m[i].y);
  28. Setfillstyle(1,c);
  29. Floodfill((m[1].x+m[2].x) div 2,(m[1].y+m[10].y) div 2,c);
  30. end;
  31. var gd,gm:integer;
  32. x,y,x1,y1:integer;
  33. p:mas;
  34. c1,c2:byte;
  35. k:char;
  36. move:boolean;
  37. begin
  38. gd:=detect;
  39. Initgraph(gd,gm,'');
  40. Setbkcolor(13);
  41. x:=340;y:=240;
  42. c1:=7;c2:=13;
  43. move:=true;
  44. repeat
  45. if keypressed then
  46. begin
  47. k:=readkey;
  48. if k=#80 then
  49. begin
  50. y1:=y;
  51. x1:=x;
  52. y:=y+5;
  53. move:=true;
  54. end;
  55. if k=#72 then
  56. begin
  57. y1:=y;
  58. x1:=x;
  59. y:=y-5;
  60. move:=true;
  61. end;
  62. if k=#77 then
  63. begin
  64. y1:=y;
  65. x1:=x;
  66. x:=x+5;
  67. move:=true;
  68. end;
  69. if k=#75 then
  70. begin
  71. y1:=y;
  72. x1:=x;
  73. x:=x-5;
  74. move:=true;
  75. end;
  76. end;
  77. if move=true then
  78. begin
  79. Z(x1,y1,p,c2);
  80. Z(x,y,p,c1);
  81. move:=false;
  82. end;
  83. until kosta=true;
  84. closegraph
  85. end.
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.pas:2: error: module/unit interface `crt' could not be imported
stdout
Standard output is empty