130.圆环图案

简介: 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();
}
相关文章
|
2天前
一个最优美的图案
【6月更文挑战第30天】一个最优美的图案。
10 2
|
8月前
颜色拾取器
颜色拾取器
34 0
|
11月前
|
编译器 Windows
<1>[QTCN]颜色拾取器
桌面置顶 获取全局鼠标坐标和颜色(Web值、RGB) 新增: 按下鼠标右键停止/开启
74 1
138.正方形螺旋拼块图案
138.正方形螺旋拼块图案
54 0