circle:C

circle:C是一則函式,:x,y為圓心坐標,RADIUS為半徑。

參數

:x,y為圓心坐標,RADIUS為半徑

案例

#include <graphics.h>

#include <stdlib.h>

#include <stdio.h>

#include <conio.h>

int main(void)

{

int gdriver = DETECT, gmode, errorcode;

int midx, midy;

int radius = 100;

initgraph(&gdriver, &gmode, );

errorcode = graphresult();

if (errorcode != grOk)

{

printf("Graphics error: %s

", grapherrormsg(errorcode));

printf("Press any key to halt:");

getch();

exit(1);

}

midx = getmaxx() / 2;

midy = getmaxy() / 2;

setcolor(getmaxcolor());

circle(midx, midy, radius);

getch();

closegraph();

return 0;

}

相關詞條

相關搜尋

熱門詞條

聯絡我們