<?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=358&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Gentoo中文社区 / C 练习实例49]]></title>
		<link>https://www.gentoo-zh.org/viewtopic.php?id=358</link>
		<description><![CDATA[C 练习实例49 最近发表的帖子。]]></description>
		<lastBuildDate>Mon, 29 Aug 2022 11:27:38 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[C 练习实例49]]></title>
			<link>https://www.gentoo-zh.org/viewtopic.php?pid=364#p364</link>
			<description><![CDATA[<p>题目：#if #ifdef和#ifndef的综合应用。</p><p>程序分析：无。</p><p>程序源代码：</p><div class="codebox"><pre class="vscroll"><code>#include&lt;stdio.h&gt;
#define MAX
#define MAXIMUM(x,y)(x&gt;y)?x:y
#define MINIMUM(x,y) (x&gt;y)?y:x
int main()
{
    int a=10,b=20;
#ifdef MAX
    printf(&quot;更大的数字是 %d\n&quot;,MAXIMUM(a,b));
#else
    printf(&quot;更小的数字是 %d\n&quot;,MINIMUM(a,b));
#endif
#ifndef MIN
    printf(&quot;更小的数字是 %d\n&quot;,MINIMUM(a,b));
#else
    printf(&quot;更大的数字是 %d\n&quot;,MAXIMUM(a,b));
#endif
#undef MAX
#ifdef MAX
    printf(&quot;更大的数字是 %d\n&quot;,MAXIMUM(a,b));
#else
    printf(&quot;更小的数字是 %d\n&quot;,MINIMUM(a,b));
#endif
#define MIN
#ifndef MIN
    printf(&quot;更小的数字是 %d\n&quot;,MINIMUM(a,b));
#else
    printf(&quot;更大的数字是 %d\n&quot;,MAXIMUM(a,b));
#endif
    return 0;
}</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (batsom)]]></author>
			<pubDate>Mon, 29 Aug 2022 11:27:38 +0000</pubDate>
			<guid>https://www.gentoo-zh.org/viewtopic.php?pid=364#p364</guid>
		</item>
	</channel>
</rss>
