Tuesday , December 6 2016
Home / Animation / Program for a Moving Kite

Program for a Moving Kite

#include
#include
#include
void main()
{
int i;
int gd=DETECT,gm;
initgraph(&gd,&gm,”C:\\TC\\bgi”);
line(250,200,200,250);
line(200,250,250,300);
line(250,300,300,250);
line(300,250,250,200);
line(250,300,225,325);
line(225,325,275,325);
line(275,325,250,300);
i=0;
while(i<200)
                {
                cleardevice();
                line(250-i,200-i,200-i,250-i);        
                line(200-i,250-i,250-i,300-i);
                line(250-i,300-i,300-i,250-i);
                line(300-i,250-i,250-i,200-i);
                line(250-i,300-i,225-i,325-i);
                line(225-i,325-i,275-i,325-i);
                line(275-i,325-i,250-i,300-i);
                i+=5;
                delay(100);
                }
getch();
closegraph();
}

OUTPUT: 

Tags: C program for moving kite, c graphics program for moving kite.

Also See:   C Program for Drawing a Scenery using Graphics

Check Also

Hide Mouse Pointer C Program

How to Hide a Mouse Pointer Program in C : This program will show and hide ...

Leave a Reply

Your email address will not be published. Required fields are marked *

Preventing spam * Time limit is exhausted. Please reload the CAPTCHA.