学习型 ASP/PHP/ASP.NET 主机 30元/年全能 ASP/PHP/ASP.NET 主机,支持月付专业 MSSQL 数据库空间,支持月付专业 MySQL 数据库空间,支持月付
发新话题
打印

C语言作业大家帮忙哦

C语言作业大家帮忙哦

偶们老师布置的BT作业

用C语言在DOS环境下编写一个图形

最好是圆

各位大虾帮忙哦~~~

TOP

我们学了指针那些但就是没教用c语言画画,不要意思帮不了你啦

看看楼下的怎么说

TOP

#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编辑过]

============================== 欢迎交流!

TOP

发新话题