C语言作业大家帮忙哦
偶们老师布置的BT作业
用C语言在DOS环境下编写一个图形
最好是圆
各位大虾帮忙哦~~~
#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\n", 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; }
[此贴子已经被作者于2004-07-10 10:58:57编辑过]