《c语言教程》

下载本书

添加书签

c语言教程- 第30部分


按键盘上方向键 ← 或 → 可快速上下翻页,按键盘上的 Enter 键可回到本书目录页,按键盘上方向键 ↑ 可回到本页顶部!
x0=x0…5;
y0=y0…5;
x1=x1+5;
y1=y1+5;

settextstyle(DEFAULT_FONT;HORIZ_DIR;2);
outtextxy(150;40;〃How beautiful it is!〃);
line(130;60;480;60);
setcolor(2);
circle(269;269;137);


【程序59】
题目:画图,综合例子。
1。程序分析:
2。程序源代码:
# define PAI 3。1415926
# define B 0。809
# include 〃graphics。h〃
#include 〃math。h〃
main()

int i;j;k;x0;y0;x;y;driver;mode;
float a;
driver=CGA;mode=CGAC0;
initgraph(&driver;&mode;〃〃);
setcolor(3);
setbkcolor(GREEN);
x0=150;y0=100;
circle(x0;y0;10);
circle(x0;y0;20);
circle(x0;y0;50);
for(i=0;i
小提示:按 回车 [Enter] 键 返回书目,按 ← 键 返回上一页, 按 → 键 进入下一页。 赞一下 添加书签加入书架