打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
130.圆环图案
/* circles */
#include <graphics.h>
#include <math.h>
#define PI 3.1415926
void main()
{
	double a;
	int x,y,r1,rs;
	int gdriver=DETECT,gmode;
	printf("Please input R1(<100) and Rs:\n");
	scanf("%d%d",&r1,&rs);

	initgraph(&gdriver,&gmode,"c:\\tc");
	cleardevice();
	setcolor(4);
	outtextxy(80,20,"This program show the Circles picture.");

	for(a=0;a<=2*PI;a+=PI/18)
	{
		x=320+r1*cos(a);
		y=240+r1*sin(a);
		circle(x,y,rs);
	}
	outtextxy(80,460,"Press any key to quit...");
	getch();
	closegraph();
}
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
一生中最怪诞的圆周率日到来之际谈谈有关圆周率的十大事实10 pi facts for the most irrational Pi Day of your life
蒙塔卡洛求圆周率
粒子滤波
What Is Pi, and How Did It Originate?
c语言 图形编程——打造简易的时钟
形状(一)
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服