fork download
  1. #include<graphics.h>
  2. #include<dos.h>
  3. #include<conio.h>
  4. #include<alloc.h>
  5. void *buf;
  6. void firstleft();
  7. void secondleft();
  8. void main()
  9. {
  10. int gd=DETECT,gm,i=0,x,y,area;
  11. initgraph(&gd,&gm,"tc:\bgi");\put your directory contains egavga.bgi
  12. rectangle(0,0,getmaxx(),getmaxy());
  13. arc(240,120,40,140,70);
  14. ellipse(165,80,10,280,20,20);
  15. ellipse(315,80,-100,170,20,20);
  16. arc(235,120,163,215,70);
  17. arc(245,120,-35,17,70);
  18. ellipse(193,178,85,280,40,20);
  19. ellipse(283,178,-100,95,40,20);
  20. ellipse(238,199,180,0,39,50);
  21. ellipse(213,123,44,240,33,40);
  22. ellipse(262,123,-60,135,33,40);
  23. ellipse(210,123,0,360,13,20);//left eye
  24. ellipse(265,123,0,360,13,20);//right eye
  25. ellipse(210,133,0,360,10,10);//left eye ball
  26. ellipse(265,133,0,360,10,10);//right eye ball
  27. ellipse(210,133,0,360,3,3);//left eye ball
  28. ellipse(265,133,0,360,3,3);//right eye ball
  29. ellipse(238,160,0,360,10,13);//nose
  30. arc(240,125,228,312,68);//mouth
  31. arc(240,120,230,310,72);//mouth
  32. setfillstyle(1,4);
  33. floodfill(238,160,15);//nose
  34. setfillstyle(1,15);
  35. floodfill(210,113,15);
  36. floodfill(265,113,15);
  37. setfillstyle(1,9);
  38. floodfill(210,100,15);
  39. setfillstyle(1,1);
  40. floodfill(315,80,15);
  41. moveto(203,220);
  42. lineto(203,260);
  43. lineto(183,260);
  44. lineto(183,350);
  45. lineto(293,350);
  46. lineto(293,260);
  47. lineto(273,260);
  48. lineto(273,220);
  49. moveto(183,350);
  50. lineto(173,460);
  51. lineto(213,460);
  52. lineto(238,400);
  53. lineto(263,460);
  54. lineto(303,460);
  55. lineto(293,350);
  56. moveto(173,460);
  57. lineto(143,478);
  58. lineto(213,478);
  59. lineto(213,460);
  60. moveto(263,460);
  61. lineto(263,478);
  62. lineto(333,478);
  63. lineto(303,460);
  64. line(238,400,238,350);
  65. //right hand
  66. moveto(183,260);
  67. lineto(113,310);
  68. lineto(183,375);
  69. moveto(183,280);
  70. lineto(137,310);
  71. lineto(181,353);
  72. setfillstyle(2,13);
  73. floodfill(190,300,15);
  74. setfillstyle(1,5);
  75. floodfill(223,400,15);
  76. setfillstyle(1,5);
  77. floodfill(253,400,15);
  78. setfillstyle(1,6);
  79. floodfill(173,470,15);
  80. floodfill(303,470,15);
  81. //fingers
  82. secondleft();
  83. ellipse(413.5,228,0,180,3.5,3.5);
  84. line(420,240,433,240);
  85. line(423,247,440,247);
  86. line(413,240,410,228);
  87. line(417,228,420,240);
  88. ellipse(433,243.5,-90,90,3.5,3.5);
  89. line(423,254,440,254);
  90. ellipse(440,250.5,-90,90,3.5,3.5);
  91. ellipse(430,257,-90,90,3,3);
  92. line(413,260,430,260);
  93. area=imagesize(409,224,444,261);
  94. buf=malloc(area);
  95. getimage(409,224,444,261,buf);
  96. while(!kbhit())
  97. {
  98. if(i==0)
  99. {
  100. setfillstyle(1,15);
  101. setcolor(15);
  102. ellipse(210,133,0,360,10,10);//left eye ball
  103. ellipse(265,133,0,360,10,10);//right eye ball
  104. setcolor(0);
  105. ellipse(210,133,0,360,3,3);//left eye ball
  106. ellipse(265,133,0,360,3,3);//right eye ball
  107. floodfill(210,133,15);
  108. floodfill(265,133,15);
  109. setcolor(0);
  110. putimage(391,209,buf,1);
  111. firstleft();
  112. setcolor(15);
  113. secondleft();
  114. putimage(409,224,buf,0);
  115. i=1;
  116. }
  117. else
  118. {
  119. setfillstyle(1,0);
  120. setcolor(0);
  121. ellipse(210,133,0,360,10,10);//left eye ball
  122. ellipse(265,133,0,360,10,10);//right eye ball
  123. floodfill(210,133,0);
  124. floodfill(265,133,0);
  125. setcolor(15);
  126. ellipse(210,133,0,360,3,3);//left eye ball
  127. ellipse(265,133,0,360,3,3);//right eye ball
  128. floodfill(210,133,15);
  129. floodfill(265,133,15);
  130. setcolor(0);
  131. putimage(409,224,buf,1);
  132. secondleft();
  133. setcolor(15);
  134. firstleft();
  135. putimage(391,209,buf,0);
  136. i=0;
  137. }
  138. delay(300);
  139. }
  140. }
  141. void firstleft()
  142. {
  143. moveto(293,260);
  144. lineto(353,276);
  145. lineto(395,223);
  146. moveto(293,280);
  147. lineto(355,296);
  148. lineto(395,245);
  149. }
  150. void secondleft()
  151. {
  152. moveto(293,260);
  153. lineto(363,280);
  154. lineto(413,240);
  155. moveto(293,280);
  156. lineto(363,300);
  157. lineto(413,260);
  158. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:1:21: fatal error: graphics.h: No such file or directory
 #include<graphics.h>
                     ^
compilation terminated.
stdout
Standard output is empty