draw circle c

Solutions on MaxInterview for draw circle c by the best coders in the world

showing results for - "draw circle c"
Manuel
31 Feb 2018
1// C Implementation for drawing circle 
2#include <graphics.h> 
3  
4//driver code 
5int main() 
6{ 
7    // gm is Graphics mode which is 
8    // a computer display mode that 
9    // generates image using pixels. 
10    // DETECT is a macro defined in 
11    // "graphics.h" header file 
12    int gd = DETECT, gm; 
13  
14    // initgraph initializes the 
15    // graphics system by loading a 
16    // graphics driver from disk 
17    initgraph(&gd, &gm, ""); 
18  
19    // circle function 
20    circle(250, 200, 50); 
21  
22    getch(); 
23  
24    // closegraph function closes the 
25    // graphics mode and deallocates 
26    // all memory allocated by 
27    // graphics system . 
28    closegraph(); 
29  
30    return 0; 
31}