C++ Program to draw a cockroach (Simple Graphics)

#include <iostream.h>
#include <conio.h>
#include <graphics.h>
void main()
{
int gd=DETECT,gm;
initgraph(&gd,&gm,"C:\\Tc\\BGI");
setfillstyle(SOLID_FILL,BROWN);
fillellipse(310,160,80,50);
ellipse(310,160,110,109,80,50);
setfillstyle(SOLID_FILL,BROWN);
fillellipse(400,160,20,20);
circle(400,160,20);
setcolor(RED);
arc(468,150,80,180,50);
arc(468,165,180,290,50);
ellipse(355,136,120,284,105,23);
ellipse(355,185,77,240,105,23);
arc(310,70,300,40,50);
arc(270,67,300,40,50);
arc(282,221,300,15,60);
arc(240,224,300,15,60);
circle(410,170,3);
circle(410,150,3);
getch();
}

Output


0 comments:

Post a Comment