<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://gentoo-zh.org/extern.php?action=feed&amp;tid=391&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Gentoo-zh / C 练习实例82]]></title>
		<link>http://www.gentoo-zh.org/viewtopic.php?id=391</link>
		<description><![CDATA[C 练习实例82 最近发表的帖子。]]></description>
		<lastBuildDate>Mon, 29 Aug 2022 11:48:30 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[C 练习实例82]]></title>
			<link>http://www.gentoo-zh.org/viewtopic.php?pid=397#p397</link>
			<description><![CDATA[<p>题目：八进制转换为十进制</p><p>程序分析：无。</p><div class="codebox"><pre><code>#include&lt;stdio.h&gt;
#include&lt;stdlib.h&gt;
int main()
{
    int n=0,i=0;
    char s[20];
    printf(&quot;请输入一个8进制数:\n&quot;);
    gets(s);
    while(s[i]!=&#039;\0&#039;){
        n=n*8+s[i]-&#039;0&#039;;
        i++;
    }
    printf(&quot;刚输入的8进制数转化为十进制为\n%d\n&quot;,n);
    
    return 0;
}</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (batsom)]]></author>
			<pubDate>Mon, 29 Aug 2022 11:48:30 +0000</pubDate>
			<guid>http://www.gentoo-zh.org/viewtopic.php?pid=397#p397</guid>
		</item>
	</channel>
</rss>
