Simple graphics program in C
#include<stdio.h>
#include<graphics.h>
#include<conio.h>
void main()
{
int gd=DETECT, gm;
initgraph(&gd, &gm, "c:\\tc\\bgi ");
circle(100,100,50);
outtextxy(75,170,"Circle");
line(100,250,540,250);
outtextxy(300,260,"Line");
rectangle(200,50,350,150);
outtextxy(240,170,"Rectangle");
ellipse(500,100,0,360,100,50);
outtextxy(480,170,"Ellipse");
line(100,250,540,250);
outtextxy(300,260,"Line");
sector(150,400,30,300,100,50);
outtextxy(120,460,"Sector");
getch();
clrscr();
closegraph();
}
Comments
Post a Comment