My photo
Bangalore, Karnataka, India
Extending one hand to help someone has more value rather than joining two hands for prayer

Archives

program to print a baby

Tuesday, September 1, 2009

#include<iostream.h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>
void main()
{
int d,m,e;
d=DETECT;
initgraph(&d,&m,"c:/tc");
e=graphresult();
if(e!=0)
{  cout<<" graphics r not opened";
   getch();
   return;
}
     setbkcolor(2);
     setcolor(YELLOW);
     ellipse(320,240,0,360,100,150);
     setfillstyle(1,YELLOW);
     floodfill(321,240,YELLOW);
     ellipse(320,90,0,360,150,75);
     setfillstyle(1,BROWN);
     floodfill(321,80,YELLOW);
     setcolor(1);
     ellipse(275,165,0,360,20,30);
     setfillstyle(1,15);
     floodfill(270,165,1);
     setcolor(1);
     ellipse(365,166,0,360,20,30);
     setfillstyle(1,15);
     floodfill(360,165,1);
     circle(275,180,15);
     setfillstyle(1,8);
     floodfill(275,180,1);
     circle(365,180,15);
     setfillstyle(1,8);
     floodfill(365,180,1);
     ellipse(320,250,0,360,22,35);
     setfillstyle(1,12);
     floodfill(320,250,1);
     ellipse(320,325,0,360,45,20);
     setfillstyle(1,4);
     floodfill(320,325,1);
     setcolor(8);
     line(275,325,365,325);
getch();
closegraph();
}

0 comments: