| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 992 人关注过本帖
标题:c语言编写圆
只看楼主 加入收藏
lbclbclbc
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2004-11-9
收藏
 问题点数:0 回复次数:3 
c语言编写圆

谁能够帮我解决

一个用c来编写的圆

谢谢在先

搜索更多相关主题的帖子: c语言 编写 
2004-11-09 16:00
lvlink
Rank: 1
等 级:新手上路
帖 子:82
专家分:0
注 册:2004-9-20
收藏
得分:0 

那你好像应该发到C认坛吧

呵呵

2004-11-09 23:05
时空之蕊
Rank: 2
等 级:新手上路
威 望:3
帖 子:691
专家分:0
注 册:2004-10-31
收藏
得分:0 
不知道是不是画圆啊!!在c的图形库中有这种标准程序的!!

我渴望掌控时空的核心——用最先进的技术,打造无比美丽的世界!
2004-11-09 23:33
lvlink
Rank: 1
等 级:新手上路
帖 子:82
专家分:0
注 册:2004-9-20
收藏
得分:0 

函数名: circle 功 能: 在给定半径以(x, y)为圆心画圆 用 法: void far circle(int x, int y, int radius); 程序例:

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

int main(void) { /* request auto detection */ int gdriver = DETECT, gmode, errorcode; int midx, midy; int radius = 100;

/* initialize graphics and local variables */ initgraph(&gdriver, &gmode, "");

/* read result of initialization */ errorcode = graphresult(); if (errorcode != grOk) /* an error occurred */ { printf("Graphics error: %s\n", grapherrormsg(errorcode)); printf("Press any key to halt:"); getch(); exit(1); /* terminate with an error code */ }

midx = getmaxx() / 2; midy = getmaxy() / 2; setcolor(getmaxcolor());

/* draw the circle */ circle(midx, midy, radius);

/* clean up */ getch(); closegraph(); return 0; }

这是我找的,看一下吧

2004-11-10 13:18
快速回复:c语言编写圆
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.013852 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved