/* .......Works on Win XP */
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
void main(void)
{
int gd=DETECT,gm,x,y;
clrscr();
initgraph(&gd,&gm,"c:\\tc\\bgi"); /*Sometimes it may be "C:\\TC\\BGI" , It depends machine to mac..*/
for(x=50;x<400;x++)
{
for(y=50;y<=x;y++)
putpixel(x,y,RED);
}
getch();
closegraph();
}
#include<conio.h>
#include<graphics.h>
void main(void)
{
int gd=DETECT,gm,x,y;
clrscr();
initgraph(&gd,&gm,"c:\\tc\\bgi"); /*Sometimes it may be "C:\\TC\\BGI" , It depends machine to mac..*/
for(x=50;x<400;x++)
{
for(y=50;y<=x;y++)
putpixel(x,y,RED);
}
getch();
closegraph();
}
No comments:
Post a Comment