<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://www.gentoo-zh.org/extern.php?action=feed&amp;tid=368&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Gentoo server 交流社区(黑客实战靶场) / C 练习实例59]]></title>
		<link>https://www.gentoo-zh.org/viewtopic.php?id=368</link>
		<description><![CDATA[C 练习实例59 最近发表的帖子。]]></description>
		<lastBuildDate>Mon, 29 Aug 2022 11:34:27 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[C 练习实例59]]></title>
			<link>https://www.gentoo-zh.org/viewtopic.php?pid=374#p374</link>
			<description><![CDATA[<p>题目：画图，综合例子。（在TC中实现）。</p><p>程序分析：无。</p><p>程序源代码：</p><div class="codebox"><pre class="vscroll"><code># define PAI 3.1415926
# define B 0.809
# include &quot;graphics.h&quot;
#include &quot;math.h&quot;
int main()
{
    int i,j,k,x0,y0,x,y,driver,mode;
    float a;
    driver=CGA;mode=CGAC0;
    initgraph(&amp;driver,&amp;mode,&quot;&quot;);
    setcolor(3);
    setbkcolor(GREEN);
    x0=150;y0=100;
    circle(x0,y0,10);
    circle(x0,y0,20);
    circle(x0,y0,50);
    for(i=0;i&lt;16;i++)
    {
        a=(2*PAI/16)*i;
        x=ceil(x0+48*cos(a));
        y=ceil(y0+48*sin(a)*B);
        setcolor(2); line(x0,y0,x,y);
    }
    setcolor(3);circle(x0,y0,60);
    /* Make 0 time normal size letters */
    settextstyle(DEFAULT_FONT,HORIZ_DIR,0);
    outtextxy(10,170,&quot;press a key&quot;);
    getch();
    setfillstyle(HATCH_FILL,YELLOW);
    floodfill(202,100,WHITE);
    getch();
    for(k=0;k&lt;=500;k++)
    {
        setcolor(3);
        for(i=0;i&lt;=16;i++)
        {
            a=(2*PAI/16)*i+(2*PAI/180)*k;
            x=ceil(x0+48*cos(a));
            y=ceil(y0+48+sin(a)*B);
            setcolor(2); line(x0,y0,x,y);
        }
        for(j=1;j&lt;=50;j++)
        {
            a=(2*PAI/16)*i+(2*PAI/180)*k-1;
            x=ceil(x0+48*cos(a));
            y=ceil(y0+48*sin(a)*B);
            line(x0,y0,x,y);
        }
    }
    restorecrtmode();
}</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (batsom)]]></author>
			<pubDate>Mon, 29 Aug 2022 11:34:27 +0000</pubDate>
			<guid>https://www.gentoo-zh.org/viewtopic.php?pid=374#p374</guid>
		</item>
	</channel>
</rss>
