Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<graphics.h>
- int main()
- {
- int gd=DETECT,gm;
- initgraph(&gd,&gm,"C:\\TC\\BGI");
- int x=getmaxx();//get maximum value for x co-ordinate
- int y=getmaxy();//get maximum value for y co-ordinate
- setfillstyle(1,YELLOW);
- fillellipse(x/2,y/2,70,70);//fill the ellipse with color(face)
- setfillstyle(1,BLACK);
- fillellipse(x/2-30,y/2-25,10,12);//fill the ellipse with color (eye)
- fillellipse(x/2+30,y/2-25,10,12);//fill the ellipse with color (eye)
- setcolor(BLACK);
- line(x/2,2-10,x/2,y/2+20);//draw a line(nose)
- arc(x/2,y/2,220,320,50);//draw arc(mouth)
- getch();
- closegraph();//close graphic mode
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement