标题:[求助]圆任意等分
只看楼主
ricoclindy
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2006-5-13
 问题点数:0 回复次数:0 
[求助]圆任意等分

#include<graphics.h>
#include<math.h>
#include<stdio.h>
int main()
{
int gdriver=DETECT,gmode,i,j,k,t=-1;
initgraph(&gdriver,&gmode,"C:\\TURBOC2");
cleardevice();
setbkcolor(WHITE);
printf("plz input NO. ");
scanf("%d",&i);
setcolor(RED);
circle(320,240,200);
for(j=1;j<=i;j++) /*n dian hua xian */
{
for(k=1;k<=i-1;t++,k++)
line(
320+200*cos(t*360/i),
240+200*sin(t*360/i),
320+200*cos((t+k)*360/i),
240+200*sin((t+k)*360/i)
);

}
getch();
closegraph();
return 0;
}

搜索更多相关主题的帖子: include int WHITE 
2006-08-15 16:08



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-84111-1-1.html




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

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