Showing posts with label line function. Show all posts
Showing posts with label line function. Show all posts

Friday, January 18, 2019

graphics basic program to print star

pic showing star
graphics-star
#include<graphics.h>
#include<conio.h>
int main()
{
int gmode= DETECT ,gm;
        initgraph(&gmode,&gm,"c://tc//bgi");


int i;
while(1)
{
for(i=1;i<15;i++)
{
     cleardevice();

    setcolor(i);
    line(100,100,160,270);
line(160,270,230,100);
line(80,210,240,210);
line(100,100,240,210);
line(80,210,230,100);
delay(500);
}
}

getch();
closegraph();
}