circle function in c graphics

C program to draw a circle in c graphics.
  • Syntax of drawing circle in c graphics is circle(int x, int y, int radius).
  • The first two arguments are used to define center of the circle in x and y co-ordinates.
  • Third argument of the circle is its radius in pixels.

C program to draw circle.

#include <graphics.h>
#include <stdio.h>



int main( )
{
    int gd=DETECT, gm;
    initgraph(&gd,&gm,"C:\\tc\\bgi");

    circle(150,150,90);
    getch();
    closegraph();

return 0;
}

circle function in c graphics


Download


1 comments: