Smiling Face


//Smiling Face

#include<stdio.h>
#include<conio.h>
#include<graphics.h>
void main()
{
    int gd=DETECT,gm,x,y;
    initgraph(&gd,&gm,"C:/TC/BGI");
    x=getmaxx()/2;
    y=getmaxy()/2;

    setcolor(14);
    circle(250,250,120);//face
    setfillstyle(1,14);
    floodfill(330,300,14);//face

    setcolor(0);
    arc(250,290,200,340,45);//mouth up
    arc(250,239,240,300,70);//mouth down
    arc(212,303,30,240,5);//mouth left
    arc(288,303,310,150,5);//mouth right
    setfillstyle(1,0);
    floodfill(252,310,0);//mouth

    setcolor(0);
    arc(210,290,80,112,70);//1 eye up
    arc(210,300,80,110,70);//1 eye down
    arc(185,230,95,290,5);//1 eye left
    arc(223,226,270,90,5);//1 eye right
    arc(290,290,68,100,70);//2 eye up
    arc(290,300,70,100,70);//2 eye down
    arc(276,226,90,270,5);//2 eye left
    arc(317,230,250,85,5);//2 eye right
    setfillstyle(1,0);
    floodfill(185,230,0);//1 eye
    floodfill(276,226,0);//2 eye

    setcolor(0);
    arc(210,285,80,120,90);//1 eyebrow up
    arc(210,293,80,117,90);//1 eyebrow down
    arc(167,210,95,290,4);//1 eyebrow left
    arc(225,200,270,90,4);//1 eyebrow right
    arc(290,285,60,100,90);//2 eyebrow up
    arc(290,293,62,100,90);//2 eyebrow down
    arc(275,200,90,270,4);//2 eyebrow left
    arc(333,210,250,85,4);//2 eyebrow right
    setfillstyle(1,0);
    floodfill(167,210,0);//1 eyebrow
    floodfill(275,200,0);//2 eyebrow

    getch();
    closegraph();
}

OUTPUT

 

Comments

Popular Posts