-->

program to draw a circle

//drawing circle
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
void main()
{
clrscr();
int gdriver, gmode;    //variables declaration
gdriver=DETECT;        // detection of graphics driver

initgraph(&gdriver, &gmode, "c:\\tc\\BGI");
       /* initialize graphics and local variables with path in TC folder*/
       /* gmode is for graphics mode you want to work. */
circle(40,40,30);  // circle with starting and ending angle (coordinate value for x and y of screen)
  //where you want to display circle;for x and y res.
  //last argument is radius.
getch();          //gets one character from user and closes the graphics.
closegraph();     //closes graphics.h
}






No comments:

Post a Comment