HOT C PROGRAMS BLOGSPOT

HOT C PROGRAMS BLOGSPOT

Click On Related Results For More Information

Monday 8 October 2012

Graphics Kite C Program

#include <conio.h>
#include <stdio.h>
#include <graphics.h>
void main(void)
{
     int x,y,gm,gd=DETECT;
     clrscr();
     initgraph(&gd,&gm,"c:\\tc\\bgi");
     y=30;
     for(x=150;x<=250;x++)
     {
     putpixel(x,y,YELLOW);
     y++;
     }
     y=270;
     for(x=110;x<=250;x++)
     {
     putpixel(x,y,YELLOW);
     y--;
     }
     x=150;
     for(y=30;y<=130;y++)
     {
     putpixel(x,y,YELLOW);
     x--;
     }
     x=50;
     for(y=130;y<=270;y++)
     {
     putpixel(x,y,YELLOW);
     x++;
     }
     for(x=110;x<=190;x++)
     putpixel(x,y,YELLOW);
     for(y=30;y<=270;y++)
     {
     x=150;
     putpixel(x,y,YELLOW);
     }
     y=130;
     for(x=50;x<=250;x++)
     putpixel(x,y,YELLOW);
     getch();
     closegraph();
}





No comments:

Post a Comment