﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>IT博客-这里的黄昏静悄悄-随笔分类-C/C++</title><link>http://www.cnitblog.com/jackrain/category/214.html</link><description>I Like C++</description><language>zh-cn</language><lastBuildDate>Mon, 26 Sep 2011 05:27:39 GMT</lastBuildDate><pubDate>Mon, 26 Sep 2011 05:27:39 GMT</pubDate><ttl>60</ttl><item><title>模256的6个数转换成模900的5个数。</title><link>http://www.cnitblog.com/jackrain/archive/2005/10/14/3302.html</link><dc:creator>这里的黄昏静悄悄</dc:creator><author>这里的黄昏静悄悄</author><pubDate>Fri, 14 Oct 2005 12:06:00 GMT</pubDate><guid>http://www.cnitblog.com/jackrain/archive/2005/10/14/3302.html</guid><wfw:comment>http://www.cnitblog.com/jackrain/comments/3302.html</wfw:comment><comments>http://www.cnitblog.com/jackrain/archive/2005/10/14/3302.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/jackrain/comments/commentRss/3302.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/jackrain/services/trackbacks/3302.html</trackback:ping><description><![CDATA[<P>问题：如何把模256的6个数转换成模900的5个数，比如(1 2 3 4 5 6)256 = 1×256^5 + 2 ×256 ^4+3 ×256^3+4×256^2 +5 ×256 +6 ＝ 1×900^4 + 620  × 900^3 + 89 ×900^2+74×900+846 = (1  620  89  74  846)900.<BR>问题求解：首先把256进制的数转换成1024进制的数，转换很简单（因为256进制是8位二进制，1024进制是10位二进制），然后在设法把1024进制的数转换成900进制的。<BR>比如χ1 × 1024 ^ 4 + χ2 × 1024^3 = χ1 ×（900+124）^4 + χ2 ×（900+124）^3，展开后可得系数。最后再作个调整即可。<BR><BR>代码如下：（程序不完善，比如可能存在溢出）</P>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">#include </SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000">iostream</SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">using</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">namespace</SPAN><SPAN style="COLOR: #000000"> std;<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000"> _256_2_1024(</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000"> _256, </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000"> _1024)<BR><IMG id=Codehighlighter1_82_450_Open_Image onclick="this.style.display='none'; Codehighlighter1_82_450_Open_Text.style.display='none'; Codehighlighter1_82_450_Closed_Image.style.display='inline'; Codehighlighter1_82_450_Closed_Text.style.display='inline';" src="http://www.cnitblog.com/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_82_450_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_82_450_Closed_Text.style.display='none'; Codehighlighter1_82_450_Open_Image.style.display='inline'; Codehighlighter1_82_450_Open_Text.style.display='inline';" src="http://www.cnitblog.com/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN id=Codehighlighter1_82_450_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.cnitblog.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_82_450_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> digit </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">2</SPAN><SPAN style="COLOR: #000000">, n </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">6</SPAN><SPAN style="COLOR: #000000">, j </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">4</SPAN><SPAN style="COLOR: #000000">,temp </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> i </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">5</SPAN><SPAN style="COLOR: #000000">; i </SPAN><SPAN style="COLOR: #000000">>=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">; i</SPAN><SPAN style="COLOR: #000000">--</SPAN><SPAN style="COLOR: #000000">)<BR><IMG id=Codehighlighter1_162_448_Open_Image onclick="this.style.display='none'; Codehighlighter1_162_448_Open_Text.style.display='none'; Codehighlighter1_162_448_Closed_Image.style.display='inline'; Codehighlighter1_162_448_Closed_Text.style.display='inline';" src="http://www.cnitblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_162_448_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_162_448_Closed_Text.style.display='none'; Codehighlighter1_162_448_Open_Image.style.display='inline'; Codehighlighter1_162_448_Open_Text.style.display='inline';" src="http://www.cnitblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN id=Codehighlighter1_162_448_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.cnitblog.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_162_448_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG id=Codehighlighter1_187_210_Open_Image onclick="this.style.display='none'; Codehighlighter1_187_210_Open_Text.style.display='none'; Codehighlighter1_187_210_Closed_Image.style.display='inline'; Codehighlighter1_187_210_Closed_Text.style.display='inline';" src="http://www.cnitblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_187_210_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_187_210_Closed_Text.style.display='none'; Codehighlighter1_187_210_Open_Image.style.display='inline'; Codehighlighter1_187_210_Open_Text.style.display='inline';" src="http://www.cnitblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>        </SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">(digit </SPAN><SPAN style="COLOR: #000000">==</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">10</SPAN><SPAN style="COLOR: #000000">)</SPAN><SPAN id=Codehighlighter1_187_210_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.cnitblog.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_187_210_Open_Text><SPAN style="COLOR: #000000">{ digit </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">2</SPAN><SPAN style="COLOR: #000000">; </SPAN><SPAN style="COLOR: #0000ff">continue</SPAN><SPAN style="COLOR: #000000">; }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>        </SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">(i </SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">)<BR><IMG id=Codehighlighter1_238_331_Open_Image onclick="this.style.display='none'; Codehighlighter1_238_331_Open_Text.style.display='none'; Codehighlighter1_238_331_Closed_Image.style.display='inline'; Codehighlighter1_238_331_Closed_Text.style.display='inline';" src="http://www.cnitblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_238_331_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_238_331_Closed_Text.style.display='none'; Codehighlighter1_238_331_Open_Image.style.display='inline'; Codehighlighter1_238_331_Open_Text.style.display='inline';" src="http://www.cnitblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>        </SPAN><SPAN id=Codehighlighter1_238_331_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.cnitblog.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_238_331_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>            temp </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> _256[i </SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">] </SPAN><SPAN style="COLOR: #000000"><<</SPAN><SPAN style="COLOR: #000000"> (</SPAN><SPAN style="COLOR: #000000">10</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000"> digit);<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>            _256[i </SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">] </SPAN><SPAN style="COLOR: #000000">>>=</SPAN><SPAN style="COLOR: #000000"> digit;<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>        }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>        </SPAN><SPAN style="COLOR: #0000ff">else</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>            temp </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>        _1024[j] </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> _256[i] </SPAN><SPAN style="COLOR: #000000">|</SPAN><SPAN style="COLOR: #000000"> (temp </SPAN><SPAN style="COLOR: #000000">&</SPAN><SPAN style="COLOR: #000000">1023</SPAN><SPAN style="COLOR: #000000">);<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>        digit </SPAN><SPAN style="COLOR: #000000">+=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">2</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>        j</SPAN><SPAN style="COLOR: #000000">--</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000"> _1024_2_900(</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000"> _1024, </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000"> _900)<BR><IMG id=Codehighlighter1_492_1100_Open_Image onclick="this.style.display='none'; Codehighlighter1_492_1100_Open_Text.style.display='none'; Codehighlighter1_492_1100_Closed_Image.style.display='inline'; Codehighlighter1_492_1100_Closed_Text.style.display='inline';" src="http://www.cnitblog.com/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_492_1100_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_492_1100_Closed_Text.style.display='none'; Codehighlighter1_492_1100_Open_Image.style.display='inline'; Codehighlighter1_492_1100_Open_Text.style.display='inline';" src="http://www.cnitblog.com/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN id=Codehighlighter1_492_1100_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.cnitblog.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_492_1100_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG id=Codehighlighter1_514_835_Open_Image onclick="this.style.display='none'; Codehighlighter1_514_835_Open_Text.style.display='none'; Codehighlighter1_514_835_Closed_Image.style.display='inline'; Codehighlighter1_514_835_Closed_Text.style.display='inline';" src="http://www.cnitblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_514_835_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_514_835_Closed_Text.style.display='none'; Codehighlighter1_514_835_Open_Image.style.display='inline'; Codehighlighter1_514_835_Open_Text.style.display='inline';" src="http://www.cnitblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> temp[][</SPAN><SPAN style="COLOR: #000000">5</SPAN><SPAN style="COLOR: #000000">] </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN id=Codehighlighter1_514_835_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.cnitblog.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_514_835_Open_Text><SPAN style="COLOR: #000000">{</SPAN><SPAN id=Codehighlighter1_515_567_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.cnitblog.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_515_567_Open_Text><SPAN style="COLOR: #000000">{</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">, </SPAN><SPAN style="COLOR: #000000">4</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">124</SPAN><SPAN style="COLOR: #000000">, </SPAN><SPAN style="COLOR: #000000">6</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">124</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">124</SPAN><SPAN style="COLOR: #000000">, </SPAN><SPAN style="COLOR: #000000">4</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">124</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">124</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">124</SPAN><SPAN style="COLOR: #000000">, </SPAN><SPAN style="COLOR: #000000">124</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">124</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">124</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">124</SPAN><SPAN style="COLOR: #000000">}</SPAN></SPAN><SPAN style="COLOR: #000000">,<BR><IMG id=Codehighlighter1_591_639_Open_Image onclick="this.style.display='none'; Codehighlighter1_591_639_Open_Text.style.display='none'; Codehighlighter1_591_639_Closed_Image.style.display='inline'; Codehighlighter1_591_639_Closed_Text.style.display='inline';" src="http://www.cnitblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_591_639_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_591_639_Closed_Text.style.display='none'; Codehighlighter1_591_639_Open_Image.style.display='inline'; Codehighlighter1_591_639_Open_Text.style.display='inline';" src="http://www.cnitblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>                     </SPAN><SPAN id=Codehighlighter1_591_639_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.cnitblog.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_591_639_Open_Text><SPAN style="COLOR: #000000">{</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">, </SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">,     </SPAN><SPAN style="COLOR: #000000">3</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">124</SPAN><SPAN style="COLOR: #000000">,     </SPAN><SPAN style="COLOR: #000000">3</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">124</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">124</SPAN><SPAN style="COLOR: #000000">,     </SPAN><SPAN style="COLOR: #000000">124</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">124</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">124</SPAN><SPAN style="COLOR: #000000">}</SPAN></SPAN><SPAN style="COLOR: #000000">,<BR><IMG id=Codehighlighter1_663_707_Open_Image onclick="this.style.display='none'; Codehighlighter1_663_707_Open_Text.style.display='none'; Codehighlighter1_663_707_Closed_Image.style.display='inline'; Codehighlighter1_663_707_Closed_Text.style.display='inline';" src="http://www.cnitblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_663_707_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_663_707_Closed_Text.style.display='none'; Codehighlighter1_663_707_Open_Image.style.display='inline'; Codehighlighter1_663_707_Open_Text.style.display='inline';" src="http://www.cnitblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>                     </SPAN><SPAN id=Codehighlighter1_663_707_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.cnitblog.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_663_707_Open_Text><SPAN style="COLOR: #000000">{</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">,  </SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">,    </SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">,         </SPAN><SPAN style="COLOR: #000000">2</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">124</SPAN><SPAN style="COLOR: #000000">,         </SPAN><SPAN style="COLOR: #000000">124</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">124</SPAN><SPAN style="COLOR: #000000">}</SPAN></SPAN><SPAN style="COLOR: #000000">,<BR><IMG id=Codehighlighter1_731_771_Open_Image onclick="this.style.display='none'; Codehighlighter1_731_771_Open_Text.style.display='none'; Codehighlighter1_731_771_Closed_Image.style.display='inline'; Codehighlighter1_731_771_Closed_Text.style.display='inline';" src="http://www.cnitblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_731_771_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_731_771_Closed_Text.style.display='none'; Codehighlighter1_731_771_Open_Image.style.display='inline'; Codehighlighter1_731_771_Open_Text.style.display='inline';" src="http://www.cnitblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>                     </SPAN><SPAN id=Codehighlighter1_731_771_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.cnitblog.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_731_771_Open_Text><SPAN style="COLOR: #000000">{</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">,  </SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">,    </SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">,         </SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">,             </SPAN><SPAN style="COLOR: #000000">124</SPAN><SPAN style="COLOR: #000000">}</SPAN></SPAN><SPAN style="COLOR: #000000">,<BR><IMG id=Codehighlighter1_795_834_Open_Image onclick="this.style.display='none'; Codehighlighter1_795_834_Open_Text.style.display='none'; Codehighlighter1_795_834_Closed_Image.style.display='inline'; Codehighlighter1_795_834_Closed_Text.style.display='inline';" src="http://www.cnitblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_795_834_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_795_834_Closed_Text.style.display='none'; Codehighlighter1_795_834_Open_Image.style.display='inline'; Codehighlighter1_795_834_Open_Text.style.display='inline';" src="http://www.cnitblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>                     </SPAN><SPAN id=Codehighlighter1_795_834_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.cnitblog.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_795_834_Open_Text><SPAN style="COLOR: #000000">{</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">,  </SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">,     </SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">,        </SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">,              </SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">}</SPAN></SPAN><SPAN style="COLOR: #000000">}</SPAN></SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> add </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> i </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">5</SPAN><SPAN style="COLOR: #000000">; i </SPAN><SPAN style="COLOR: #000000">>=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">; i</SPAN><SPAN style="COLOR: #000000">--</SPAN><SPAN style="COLOR: #000000">)<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> j </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">; j </SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">5</SPAN><SPAN style="COLOR: #000000">; j</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">)<BR><IMG id=Codehighlighter1_922_970_Open_Image onclick="this.style.display='none'; Codehighlighter1_922_970_Open_Text.style.display='none'; Codehighlighter1_922_970_Closed_Image.style.display='inline'; Codehighlighter1_922_970_Closed_Text.style.display='inline';" src="http://www.cnitblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_922_970_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_922_970_Closed_Text.style.display='none'; Codehighlighter1_922_970_Open_Image.style.display='inline'; Codehighlighter1_922_970_Open_Text.style.display='inline';" src="http://www.cnitblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN id=Codehighlighter1_922_970_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.cnitblog.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_922_970_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>        _900[i] </SPAN><SPAN style="COLOR: #000000">+=</SPAN><SPAN style="COLOR: #000000"> (temp[j][i]</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">_1024[j]);<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> k </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">4</SPAN><SPAN style="COLOR: #000000">; k </SPAN><SPAN style="COLOR: #000000">>=</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">; k</SPAN><SPAN style="COLOR: #000000">--</SPAN><SPAN style="COLOR: #000000">)<BR><IMG id=Codehighlighter1_1007_1098_Open_Image onclick="this.style.display='none'; Codehighlighter1_1007_1098_Open_Text.style.display='none'; Codehighlighter1_1007_1098_Closed_Image.style.display='inline'; Codehighlighter1_1007_1098_Closed_Text.style.display='inline';" src="http://www.cnitblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_1007_1098_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1007_1098_Closed_Text.style.display='none'; Codehighlighter1_1007_1098_Open_Image.style.display='inline'; Codehighlighter1_1007_1098_Open_Text.style.display='inline';" src="http://www.cnitblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN id=Codehighlighter1_1007_1098_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.cnitblog.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_1007_1098_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>        </SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">(_900[k] </SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">900</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">) _900[k </SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">] </SPAN><SPAN style="COLOR: #000000">+=</SPAN><SPAN style="COLOR: #000000"> (_900[k] </SPAN><SPAN style="COLOR: #000000">/</SPAN><SPAN style="COLOR: #000000">900</SPAN><SPAN style="COLOR: #000000">);<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>        _900[k] </SPAN><SPAN style="COLOR: #000000">%=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">900</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> main()<BR><IMG id=Codehighlighter1_1113_1580_Open_Image onclick="this.style.display='none'; Codehighlighter1_1113_1580_Open_Text.style.display='none'; Codehighlighter1_1113_1580_Closed_Image.style.display='inline'; Codehighlighter1_1113_1580_Closed_Text.style.display='inline';" src="http://www.cnitblog.com/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_1113_1580_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1113_1580_Closed_Text.style.display='none'; Codehighlighter1_1113_1580_Open_Image.style.display='inline'; Codehighlighter1_1113_1580_Open_Text.style.display='inline';" src="http://www.cnitblog.com/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN id=Codehighlighter1_1113_1580_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.cnitblog.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_1113_1580_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG id=Codehighlighter1_1134_1146_Open_Image onclick="this.style.display='none'; Codehighlighter1_1134_1146_Open_Text.style.display='none'; Codehighlighter1_1134_1146_Closed_Image.style.display='inline'; Codehighlighter1_1134_1146_Closed_Text.style.display='inline';" src="http://www.cnitblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_1134_1146_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1134_1146_Closed_Text.style.display='none'; Codehighlighter1_1134_1146_Open_Image.style.display='inline'; Codehighlighter1_1134_1146_Open_Text.style.display='inline';" src="http://www.cnitblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> __256[</SPAN><SPAN style="COLOR: #000000">6</SPAN><SPAN style="COLOR: #000000">] </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN id=Codehighlighter1_1134_1146_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.cnitblog.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_1134_1146_Open_Text><SPAN style="COLOR: #000000">{</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">,</SPAN><SPAN style="COLOR: #000000">2</SPAN><SPAN style="COLOR: #000000">,</SPAN><SPAN style="COLOR: #000000">3</SPAN><SPAN style="COLOR: #000000">,</SPAN><SPAN style="COLOR: #000000">4</SPAN><SPAN style="COLOR: #000000">,</SPAN><SPAN style="COLOR: #000000">5</SPAN><SPAN style="COLOR: #000000">,</SPAN><SPAN style="COLOR: #000000">6</SPAN><SPAN style="COLOR: #000000">}</SPAN></SPAN><SPAN style="COLOR: #000000">, i </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;<BR><IMG id=Codehighlighter1_1173_1185_Open_Image onclick="this.style.display='none'; Codehighlighter1_1173_1185_Open_Text.style.display='none'; Codehighlighter1_1173_1185_Closed_Image.style.display='inline'; Codehighlighter1_1173_1185_Closed_Text.style.display='inline';" src="http://www.cnitblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_1173_1185_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1173_1185_Closed_Text.style.display='none'; Codehighlighter1_1173_1185_Open_Image.style.display='inline'; Codehighlighter1_1173_1185_Open_Text.style.display='inline';" src="http://www.cnitblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> _256[] </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN id=Codehighlighter1_1173_1185_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.cnitblog.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_1173_1185_Open_Text><SPAN style="COLOR: #000000">{</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">,</SPAN><SPAN style="COLOR: #000000">2</SPAN><SPAN style="COLOR: #000000">,</SPAN><SPAN style="COLOR: #000000">3</SPAN><SPAN style="COLOR: #000000">,</SPAN><SPAN style="COLOR: #000000">4</SPAN><SPAN style="COLOR: #000000">,</SPAN><SPAN style="COLOR: #000000">5</SPAN><SPAN style="COLOR: #000000">,</SPAN><SPAN style="COLOR: #000000">6</SPAN><SPAN style="COLOR: #000000">}</SPAN></SPAN><SPAN style="COLOR: #000000">;<BR><IMG id=Codehighlighter1_1207_1209_Open_Image onclick="this.style.display='none'; Codehighlighter1_1207_1209_Open_Text.style.display='none'; Codehighlighter1_1207_1209_Closed_Image.style.display='inline'; Codehighlighter1_1207_1209_Closed_Text.style.display='inline';" src="http://www.cnitblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_1207_1209_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1207_1209_Closed_Text.style.display='none'; Codehighlighter1_1207_1209_Open_Image.style.display='inline'; Codehighlighter1_1207_1209_Open_Text.style.display='inline';" src="http://www.cnitblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> _1024[</SPAN><SPAN style="COLOR: #000000">5</SPAN><SPAN style="COLOR: #000000">] </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN id=Codehighlighter1_1207_1209_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.cnitblog.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_1207_1209_Open_Text><SPAN style="COLOR: #000000">{</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">}</SPAN></SPAN><SPAN style="COLOR: #000000">;<BR><IMG id=Codehighlighter1_1230_1232_Open_Image onclick="this.style.display='none'; Codehighlighter1_1230_1232_Open_Text.style.display='none'; Codehighlighter1_1230_1232_Closed_Image.style.display='inline'; Codehighlighter1_1230_1232_Closed_Text.style.display='inline';" src="http://www.cnitblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_1230_1232_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1230_1232_Closed_Text.style.display='none'; Codehighlighter1_1230_1232_Open_Image.style.display='inline'; Codehighlighter1_1230_1232_Open_Text.style.display='inline';" src="http://www.cnitblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> _900[</SPAN><SPAN style="COLOR: #000000">5</SPAN><SPAN style="COLOR: #000000">] </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN id=Codehighlighter1_1230_1232_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.cnitblog.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_1230_1232_Open_Text><SPAN style="COLOR: #000000">{</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">}</SPAN></SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>    _256_2_1024(__256, _1024);<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>    _1024_2_900(_1024, _900);<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>    cout </SPAN><SPAN style="COLOR: #000000"><<</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000">(i </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">; i </SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">6</SPAN><SPAN style="COLOR: #000000">; i</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">)<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>        cout </SPAN><SPAN style="COLOR: #000000"><<</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">_</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000"><<</SPAN><SPAN style="COLOR: #000000"> _256[i];<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>    cout </SPAN><SPAN style="COLOR: #000000"><<</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">)256 = (</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000">(i </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">; i </SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">5</SPAN><SPAN style="COLOR: #000000">; i</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">)<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>        cout </SPAN><SPAN style="COLOR: #000000"><<</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">_</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000"><<</SPAN><SPAN style="COLOR: #000000"> _1024[i];<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>    cout </SPAN><SPAN style="COLOR: #000000"><<</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">)1024 = (</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000">(i </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">; i </SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">5</SPAN><SPAN style="COLOR: #000000">; i</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">)<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>        cout </SPAN><SPAN style="COLOR: #000000"><<</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">_</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000"><<</SPAN><SPAN style="COLOR: #000000"> _900[i];<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>    cout </SPAN><SPAN style="COLOR: #000000"><<</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">)900</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000"><<</SPAN><SPAN style="COLOR: #000000">endl;<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/InBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.cnitblog.com/images/OutliningIndicators/None.gif" align=top></SPAN></DIV><img src ="http://www.cnitblog.com/jackrain/aggbug/3302.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/jackrain/" target="_blank">这里的黄昏静悄悄</a> 2005-10-14 20:06 <a href="http://www.cnitblog.com/jackrain/archive/2005/10/14/3302.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>把数字转换成人民币大写形式【C/C++】</title><link>http://www.cnitblog.com/jackrain/archive/2005/10/14/3293.html</link><dc:creator>这里的黄昏静悄悄</dc:creator><author>这里的黄昏静悄悄</author><pubDate>Fri, 14 Oct 2005 07:09:00 GMT</pubDate><guid>http://www.cnitblog.com/jackrain/archive/2005/10/14/3293.html</guid><wfw:comment>http://www.cnitblog.com/jackrain/comments/3293.html</wfw:comment><comments>http://www.cnitblog.com/jackrain/archive/2005/10/14/3293.html#Feedback</comments><slash:comments>5</slash:comments><wfw:commentRss>http://www.cnitblog.com/jackrain/comments/commentRss/3293.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/jackrain/services/trackbacks/3293.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;把阿拉伯数字钱币转换汉字大写形式是经常要用到的，这里就用C/C++来实现之。首先我们把数字分成两部分：整数部分+小数部分；分离很简单，就是用m - (int)m就可以了。（m为金额）。&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 因为对于人民币来说，小数只留两位即可，所以小数部分很容易实...&nbsp;&nbsp;<a href='http://www.cnitblog.com/jackrain/archive/2005/10/14/3293.html'>阅读全文</a><img src ="http://www.cnitblog.com/jackrain/aggbug/3293.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/jackrain/" target="_blank">这里的黄昏静悄悄</a> 2005-10-14 15:09 <a href="http://www.cnitblog.com/jackrain/archive/2005/10/14/3293.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>大小写转换的方法【C/C++】</title><link>http://www.cnitblog.com/jackrain/archive/2005/10/10/3207.html</link><dc:creator>这里的黄昏静悄悄</dc:creator><author>这里的黄昏静悄悄</author><pubDate>Mon, 10 Oct 2005 03:52:00 GMT</pubDate><guid>http://www.cnitblog.com/jackrain/archive/2005/10/10/3207.html</guid><wfw:comment>http://www.cnitblog.com/jackrain/comments/3207.html</wfw:comment><comments>http://www.cnitblog.com/jackrain/archive/2005/10/10/3207.html#Feedback</comments><slash:comments>8</slash:comments><wfw:commentRss>http://www.cnitblog.com/jackrain/comments/commentRss/3207.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/jackrain/services/trackbacks/3207.html</trackback:ping><description><![CDATA[<DIV>ASCII码表大家都很熟悉了吧，利用码的排列规律，我们可以很容易的实现一些操作，比如判断是否是数字、大小写转换等。</DIV>
<DIV>这里写大小写转换的函数:</DIV>
<DIV>
<TABLE style="BORDER-RIGHT: #999 1px solid; BORDER-TOP: #999 1px solid; FONT-SIZE: 12px; BORDER-LEFT: #999 1px solid; WIDTH: 80%; BORDER-BOTTOM: #999 1px solid" align=center>
<TBODY>
<TR>
<TD>char toUpper(const char&amp; ch)<BR>{<BR>&nbsp;&nbsp;&nbsp; return ch &amp; 0x5F;<BR>}<BR>char toLower(const char&amp; ch)<BR>{<BR>&nbsp;&nbsp;&nbsp; return ch | 0x20;<BR>}</TD></TR></TBODY></TABLE></DIV>
<DIV>&nbsp;</DIV>
<DIV>函数原理：大小写字母的差是32，比如大写的A是65，小写的A是97，所以我们把右边数第6位置0或者1就能实现大小写转换。转换成大写时，把第6位置0，用ch &amp; 0x5F实现。转换成小写时置1，用ch | 0x20实现。怎么样，相当的简单吧，由此，我们可以写string类的toUpper和toLower函数了。^_^，更多技巧尽在探索中。</DIV>
<DIV></DIV>
<DIV></DIV><img src ="http://www.cnitblog.com/jackrain/aggbug/3207.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/jackrain/" target="_blank">这里的黄昏静悄悄</a> 2005-10-10 11:52 <a href="http://www.cnitblog.com/jackrain/archive/2005/10/10/3207.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>判断素数的几种方法思考</title><link>http://www.cnitblog.com/jackrain/archive/2005/09/25/2879.html</link><dc:creator>这里的黄昏静悄悄</dc:creator><author>这里的黄昏静悄悄</author><pubDate>Sun, 25 Sep 2005 07:22:00 GMT</pubDate><guid>http://www.cnitblog.com/jackrain/archive/2005/09/25/2879.html</guid><wfw:comment>http://www.cnitblog.com/jackrain/comments/2879.html</wfw:comment><comments>http://www.cnitblog.com/jackrain/archive/2005/09/25/2879.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cnitblog.com/jackrain/comments/commentRss/2879.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/jackrain/services/trackbacks/2879.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 判断素数的几种方法思考【】判断素数是经常遇到的问题，下面就总结几种方法1、最简单的从2～sqrt(N)的方法（N&gt;=2，下同）2、筛选法3、素数判断法概念说明：素数，又叫质数，指除了1和它本身外，没有其他因数。（如果你不知道什么叫因数，建议你去从小学2年级开始学习-_-!）；合数：自然就是除了1和它本身外有其他因数。需指出一点，1既不是质数也不是合数。因此，判断N是素数的简单而笨的方法就...&nbsp;&nbsp;<a href='http://www.cnitblog.com/jackrain/archive/2005/09/25/2879.html'>阅读全文</a><img src ="http://www.cnitblog.com/jackrain/aggbug/2879.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/jackrain/" target="_blank">这里的黄昏静悄悄</a> 2005-09-25 15:22 <a href="http://www.cnitblog.com/jackrain/archive/2005/09/25/2879.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>一道数学题</title><link>http://www.cnitblog.com/jackrain/archive/2005/09/13/2631.html</link><dc:creator>这里的黄昏静悄悄</dc:creator><author>这里的黄昏静悄悄</author><pubDate>Tue, 13 Sep 2005 04:43:00 GMT</pubDate><guid>http://www.cnitblog.com/jackrain/archive/2005/09/13/2631.html</guid><wfw:comment>http://www.cnitblog.com/jackrain/comments/2631.html</wfw:comment><comments>http://www.cnitblog.com/jackrain/archive/2005/09/13/2631.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/jackrain/comments/commentRss/2631.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/jackrain/services/trackbacks/2631.html</trackback:ping><description><![CDATA[<P>今天在CSDN上看到一道题目：<BR>[ ][ ][ ][1][ ][4][ ][ ][ ] <BR>[ ][ ][ ][ ][ ][ ][4][2][ ] <BR>[ ][4][9][ ][7][ ][ ][ ][3] <BR>[ ][ ][ ][ ][ ][8][9][ ][ ] <BR>[6][3][ ][ ][ ][5][ ][ ][1] <BR>[7][9][ ][2][ ][ ][ ][8][ ] <BR>[ ][ ][ ][ ][ ][1][3][ ][ ] <BR>[9][ ][3][ ][6][ ][5][ ][ ] <BR>[8][ ][5][9][ ][ ][ ][6][ ] </P>
<P>以上是一个 9 * 9 的表格，请在空白处填上数字（0 - 9），使每一行、每一列都是1、2、3、4、5、6、7、8、9。<BR>等有时间再写程序。</P><img src ="http://www.cnitblog.com/jackrain/aggbug/2631.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/jackrain/" target="_blank">这里的黄昏静悄悄</a> 2005-09-13 12:43 <a href="http://www.cnitblog.com/jackrain/archive/2005/09/13/2631.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>控制台程序液晶法显示数字【C语言实现】</title><link>http://www.cnitblog.com/jackrain/archive/2005/08/28/2395.html</link><dc:creator>这里的黄昏静悄悄</dc:creator><author>这里的黄昏静悄悄</author><pubDate>Sun, 28 Aug 2005 09:02:00 GMT</pubDate><guid>http://www.cnitblog.com/jackrain/archive/2005/08/28/2395.html</guid><wfw:comment>http://www.cnitblog.com/jackrain/comments/2395.html</wfw:comment><comments>http://www.cnitblog.com/jackrain/archive/2005/08/28/2395.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/jackrain/comments/commentRss/2395.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/jackrain/services/trackbacks/2395.html</trackback:ping><description><![CDATA[效果图如下，代码附后<BR>要求，输入第一个数字n，0&lt;n&lt;20,第二个为要显示的数字，要求输出第二个数字，并且每个数字要求占n+2列2n+3行<BR><IMG height=257 alt=displaynumber.jpg src="http://www.cnitblog.com/images/cnitblog_com/jackrain/image/displaynumber.jpg" width=667 border=0> 
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid">
<DIV><SPAN style="COLOR: #008080">&nbsp;&nbsp;1</SPAN>&nbsp;<SPAN style="COLOR: #008000">/*</SPAN><SPAN style="COLOR: #008000">--------------------------------------------------------------------<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;&nbsp;2</SPAN>&nbsp;<SPAN style="COLOR: #008000">&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;filename&nbsp;:&nbsp;digitdisplay.c<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;&nbsp;3</SPAN>&nbsp;<SPAN style="COLOR: #008000">&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Discribe&nbsp;:&nbsp;display&nbsp;a&nbsp;number<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;&nbsp;4</SPAN>&nbsp;<SPAN style="COLOR: #008000">&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Author&nbsp;&nbsp;&nbsp;:&nbsp;JackRain<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;&nbsp;5</SPAN>&nbsp;<SPAN style="COLOR: #008000">&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Date&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;08--28--2005<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;&nbsp;6</SPAN>&nbsp;<SPAN style="COLOR: #008000">&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;E_mail&nbsp;&nbsp;&nbsp;:&nbsp;jack.fandlr@gmail.com<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;&nbsp;7</SPAN>&nbsp;<SPAN style="COLOR: #008000">&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Test&nbsp;with&nbsp;C-Free&nbsp;3.5<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;&nbsp;8</SPAN>&nbsp;<SPAN style="COLOR: #008000">&nbsp;*-------------------------------------------------------------------</SPAN><SPAN style="COLOR: #008000">*/</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;&nbsp;9</SPAN>&nbsp;<SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;10</SPAN>&nbsp;<SPAN style="COLOR: #000000">#include&nbsp;</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">stdio.h</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;11</SPAN>&nbsp;<SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;12</SPAN>&nbsp;<SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;13</SPAN>&nbsp;<SPAN style="COLOR: #000000"></SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;main()<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;14</SPAN>&nbsp;<SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;15</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;digittab[</SPAN><SPAN style="COLOR: #000000">10</SPAN><SPAN style="COLOR: #000000">][</SPAN><SPAN style="COLOR: #000000">2</SPAN><SPAN style="COLOR: #000000">]</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">{{</SPAN><SPAN style="COLOR: #000000">5</SPAN><SPAN style="COLOR: #000000">,</SPAN><SPAN style="COLOR: #000000">0xF</SPAN><SPAN style="COLOR: #000000">},</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">0</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;16</SPAN>&nbsp;<SPAN style="COLOR: #008000"></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">,</SPAN><SPAN style="COLOR: #000000">0x5</SPAN><SPAN style="COLOR: #000000">},</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">1</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;17</SPAN>&nbsp;<SPAN style="COLOR: #008000"></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{</SPAN><SPAN style="COLOR: #000000">7</SPAN><SPAN style="COLOR: #000000">,</SPAN><SPAN style="COLOR: #000000">0x6</SPAN><SPAN style="COLOR: #000000">},</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">2</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;18</SPAN>&nbsp;<SPAN style="COLOR: #008000"></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{</SPAN><SPAN style="COLOR: #000000">7</SPAN><SPAN style="COLOR: #000000">,</SPAN><SPAN style="COLOR: #000000">0x5</SPAN><SPAN style="COLOR: #000000">},</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">3</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;19</SPAN>&nbsp;<SPAN style="COLOR: #008000"></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{</SPAN><SPAN style="COLOR: #000000">2</SPAN><SPAN style="COLOR: #000000">,</SPAN><SPAN style="COLOR: #000000">0xD</SPAN><SPAN style="COLOR: #000000">},</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">4</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;20</SPAN>&nbsp;<SPAN style="COLOR: #008000"></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{</SPAN><SPAN style="COLOR: #000000">7</SPAN><SPAN style="COLOR: #000000">,</SPAN><SPAN style="COLOR: #000000">0x9</SPAN><SPAN style="COLOR: #000000">},</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">5</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;21</SPAN>&nbsp;<SPAN style="COLOR: #008000"></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{</SPAN><SPAN style="COLOR: #000000">7</SPAN><SPAN style="COLOR: #000000">,</SPAN><SPAN style="COLOR: #000000">0xB</SPAN><SPAN style="COLOR: #000000">},</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">6</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;22</SPAN>&nbsp;<SPAN style="COLOR: #008000"></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{</SPAN><SPAN style="COLOR: #000000">4</SPAN><SPAN style="COLOR: #000000">,</SPAN><SPAN style="COLOR: #000000">0x5</SPAN><SPAN style="COLOR: #000000">},</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">7</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;23</SPAN>&nbsp;<SPAN style="COLOR: #008000"></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{</SPAN><SPAN style="COLOR: #000000">7</SPAN><SPAN style="COLOR: #000000">,</SPAN><SPAN style="COLOR: #000000">0xF</SPAN><SPAN style="COLOR: #000000">},</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">8</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;24</SPAN>&nbsp;<SPAN style="COLOR: #008000"></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{</SPAN><SPAN style="COLOR: #000000">7</SPAN><SPAN style="COLOR: #000000">,</SPAN><SPAN style="COLOR: #000000">0xD</SPAN><SPAN style="COLOR: #000000">}};</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">9</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;25</SPAN>&nbsp;<SPAN style="COLOR: #008000"></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;i,n,j</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">,strline;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;26</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">char</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">p,code1</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">,code2</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">,code3&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">,a1&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">,a2</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">,a3</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">,a4</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;27</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">char</SPAN><SPAN style="COLOR: #000000">&nbsp;cA[</SPAN><SPAN style="COLOR: #000000">15</SPAN><SPAN style="COLOR: #000000">];<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;28</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;printf(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Please&nbsp;input&nbsp;two&nbsp;numbers:</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;29</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;scanf(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">%d&nbsp;%s</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">,</SPAN><SPAN style="COLOR: #000000">&amp;</SPAN><SPAN style="COLOR: #000000">n,cA);<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;30</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;p&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;cA;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;31</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;output&nbsp;the&nbsp;first&nbsp;line</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;32</SPAN>&nbsp;<SPAN style="COLOR: #008000"></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">while</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">(p</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">j)&nbsp;</SPAN><SPAN style="COLOR: #000000">!=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">\0</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">)<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;33</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;{<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;34</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;35</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">(digittab[</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">(p</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">j)</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">][</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">]</SPAN><SPAN style="COLOR: #000000">&amp;</SPAN><SPAN style="COLOR: #000000">4</SPAN><SPAN style="COLOR: #000000">)<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;36</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;code1&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;37</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">else</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;38</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;code1&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;39</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000">(strline&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;&nbsp;strline&nbsp;</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">&nbsp;n;&nbsp;strline</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">)<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;40</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">%c</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">,code1);<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;41</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;42</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;j</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;43</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;}<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;44</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;printf(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">\n</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;45</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;out&nbsp;put&nbsp;2~&nbsp;n+1&nbsp;lines</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;46</SPAN>&nbsp;<SPAN style="COLOR: #008000"></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000">(i&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;&nbsp;i&nbsp;</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">&nbsp;n;&nbsp;i</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">)<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;47</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;{<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;48</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;j&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;49</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">while</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">(p</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">j)</SPAN><SPAN style="COLOR: #000000">!=</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">\0</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">)<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;50</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;51</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a1&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;52</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a2&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;53</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">switch</SPAN><SPAN style="COLOR: #000000">(digittab[</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">(p</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">j)</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">][</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">]</SPAN><SPAN style="COLOR: #000000">&amp;</SPAN><SPAN style="COLOR: #000000">0xC</SPAN><SPAN style="COLOR: #000000">)<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;54</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;55</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">case</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">0xC</SPAN><SPAN style="COLOR: #000000">:a2</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">|</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;56</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">case</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">0x8</SPAN><SPAN style="COLOR: #000000">:&nbsp;a1&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">|</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">;</SPAN><SPAN style="COLOR: #0000ff">break</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;57</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">case</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">0x4</SPAN><SPAN style="COLOR: #000000">:&nbsp;a2&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">|</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">;</SPAN><SPAN style="COLOR: #0000ff">break</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;58</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;59</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">%c</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">,a1);<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;60</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000">(strline&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;&nbsp;strline&nbsp;</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">&nbsp;n;&nbsp;strline</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">)<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;61</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;62</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">%c&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">,a2);<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;63</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;j</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;64</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;65</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">\n</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;66</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;}<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;67</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;output&nbsp;the&nbsp;middle&nbsp;line</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;68</SPAN>&nbsp;<SPAN style="COLOR: #008000"></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;j&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;69</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">while</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">(p</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">j)&nbsp;</SPAN><SPAN style="COLOR: #000000">!=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">\0</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">)<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;70</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;{<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;71</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;72</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">(digittab[</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">(p</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">j)</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">][</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">]</SPAN><SPAN style="COLOR: #000000">&amp;</SPAN><SPAN style="COLOR: #000000">2</SPAN><SPAN style="COLOR: #000000">)<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;73</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;code2&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;74</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">else</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;75</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;code2&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;76</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000">(strline&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;&nbsp;strline&nbsp;</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">&nbsp;n;strline</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">)<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;77</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">%c</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">,code2);<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;78</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;79</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;j</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;80</SPAN>&nbsp;<SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;81</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;}<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;82</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;printf(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">\n</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;83</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;output&nbsp;n+4~&nbsp;2n+2&nbsp;lines</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;84</SPAN>&nbsp;<SPAN style="COLOR: #008000"></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000">(i&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;&nbsp;i</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">&nbsp;n;i</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">)<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;85</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;{<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;86</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;j</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;87</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">while</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">(p</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">j)</SPAN><SPAN style="COLOR: #000000">!=</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">\0</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">)<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;88</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;89</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a3&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;90</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a4&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;91</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">switch</SPAN><SPAN style="COLOR: #000000">(digittab[</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">(p</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">j)</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">][</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">]</SPAN><SPAN style="COLOR: #000000">&amp;</SPAN><SPAN style="COLOR: #000000">3</SPAN><SPAN style="COLOR: #000000">)<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;92</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;93</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">case</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">3</SPAN><SPAN style="COLOR: #000000">:&nbsp;a3&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">|</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;94</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">case</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">:&nbsp;a4</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">|</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">;</SPAN><SPAN style="COLOR: #0000ff">break</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;95</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">case</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">2</SPAN><SPAN style="COLOR: #000000">:&nbsp;a3</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">|</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">;</SPAN><SPAN style="COLOR: #0000ff">break</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;96</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;97</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">%c</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">,a3);<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;98</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000">(strline&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;&nbsp;strline</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">n;strline</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">)<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;99</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR></SPAN><SPAN style="COLOR: #008080">100</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">%c</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">,a4);<BR></SPAN><SPAN style="COLOR: #008080">101</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR></SPAN><SPAN style="COLOR: #008080">102</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;j</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">103</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR></SPAN><SPAN style="COLOR: #008080">104</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">\n</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR></SPAN><SPAN style="COLOR: #008080">105</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;}<BR></SPAN><SPAN style="COLOR: #008080">106</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;output&nbsp;the&nbsp;last&nbsp;line</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">107</SPAN>&nbsp;<SPAN style="COLOR: #008000"></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;j</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">108</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">while</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">(p</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">j)&nbsp;</SPAN><SPAN style="COLOR: #000000">!=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">\0</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">)<BR></SPAN><SPAN style="COLOR: #008080">109</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;{<BR></SPAN><SPAN style="COLOR: #008080">110</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">(digittab[</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">(p</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">j)</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">][</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">]</SPAN><SPAN style="COLOR: #000000">&amp;</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">)<BR></SPAN><SPAN style="COLOR: #008080">111</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<BR></SPAN><SPAN style="COLOR: #008080">112</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;code3</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">113</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR></SPAN><SPAN style="COLOR: #008080">114</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">else</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">115</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;code3&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">116</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR></SPAN><SPAN style="COLOR: #008080">117</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000">(strline&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">&nbsp;;&nbsp;strline&nbsp;</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">&nbsp;n;&nbsp;strline</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">)<BR></SPAN><SPAN style="COLOR: #008080">118</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">%c</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">,code3);<BR></SPAN><SPAN style="COLOR: #008080">119</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR></SPAN><SPAN style="COLOR: #008080">120</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;j</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">121</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;}<BR></SPAN><SPAN style="COLOR: #008080">122</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;printf(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">\n</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR></SPAN><SPAN style="COLOR: #008080">123</SPAN>&nbsp;<SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">124</SPAN>&nbsp;<SPAN style="COLOR: #000000">}</SPAN></DIV></DIV><img src ="http://www.cnitblog.com/jackrain/aggbug/2395.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/jackrain/" target="_blank">这里的黄昏静悄悄</a> 2005-08-28 17:02 <a href="http://www.cnitblog.com/jackrain/archive/2005/08/28/2395.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>关于把C/C++代码转换成Html的思考</title><link>http://www.cnitblog.com/jackrain/archive/2005/08/10/1456.html</link><dc:creator>这里的黄昏静悄悄</dc:creator><author>这里的黄昏静悄悄</author><pubDate>Wed, 10 Aug 2005 03:02:00 GMT</pubDate><guid>http://www.cnitblog.com/jackrain/archive/2005/08/10/1456.html</guid><wfw:comment>http://www.cnitblog.com/jackrain/comments/1456.html</wfw:comment><comments>http://www.cnitblog.com/jackrain/archive/2005/08/10/1456.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.cnitblog.com/jackrain/comments/commentRss/1456.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/jackrain/services/trackbacks/1456.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 很多时候都要把C/C++代码发到网页中来，但是直接拷贝、粘贴后的效果并不好，许多符号因为是html的特殊字符而造成显示的混乱（最常见的就是'&lt;'和'&gt;'符号），所以就想把C/C++文件简单处理成html代码，当然早就有人做过了，不过觉得自己想想如何实现还是挺不错的！&nbsp;&nbsp;...&nbsp;&nbsp;<a href='http://www.cnitblog.com/jackrain/archive/2005/08/10/1456.html'>阅读全文</a><img src ="http://www.cnitblog.com/jackrain/aggbug/1456.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/jackrain/" target="_blank">这里的黄昏静悄悄</a> 2005-08-10 11:02 <a href="http://www.cnitblog.com/jackrain/archive/2005/08/10/1456.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>C++中的const限定符【ZT+修改】</title><link>http://www.cnitblog.com/jackrain/archive/2005/08/07/1376.html</link><dc:creator>这里的黄昏静悄悄</dc:creator><author>这里的黄昏静悄悄</author><pubDate>Sun, 07 Aug 2005 01:44:00 GMT</pubDate><guid>http://www.cnitblog.com/jackrain/archive/2005/08/07/1376.html</guid><wfw:comment>http://www.cnitblog.com/jackrain/comments/1376.html</wfw:comment><comments>http://www.cnitblog.com/jackrain/archive/2005/08/07/1376.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/jackrain/comments/commentRss/1376.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/jackrain/services/trackbacks/1376.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 常类型是指使用类型修饰符const说明的类型，常类型的变量或对象的值是不能被更新的。因此，定义或说明常类型时必须进行初始化，<FONT color=#ff0000>初始化的时候右值必须是编译时就能确定值的表达式</FONT>。<BR><BR>　　一般常量和对象常量<BR><BR>　　1. 一般常量<BR><BR>　　一般常量是指简单类型的常量。这种常量在定义时，修饰符const可以用在类型说明符前，也可以用在类型说明符后。如：<BR><BR>　　int const x=2;<BR><BR>　　或<BR><BR>　　const int x=2;<BR>&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; const int x = a; // a is a variable&nbsp;.<FONT color=#ff0000> Error不能把变量的值赋给const<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT><FONT color=#000000>const&nbsp; int x = sizeof(int); //</FONT><FONT color=#0000ff>OK ,因为sizeof的值在编译期可以确定<BR></FONT><BR>　　定义或说明一个常数组可采用如下格式：<BR><BR>　　&lt;类型说明符&gt; const &lt;数组名&gt;[&lt;大小&gt;]…<BR><BR>　　或者<BR><BR>　　const &lt;类型说明符&gt; &lt;数组名&gt;[&lt;大小&gt;]…<BR><BR>　　例如：<BR><BR>　　int const a[5]={1, 2, 3, 4, 5};<BR><BR>　　2. 常对象<BR><BR>　　常对象是指对象常量，定义格式如下：<BR><BR>　　&lt;类名&gt; const &lt;对象名&gt;<BR><BR>　　或者<BR><BR>　　const &lt;类名&gt; &lt;对象名&gt;<BR><BR>　　定义常对象时，同样要进行初始化，并且该对象不能再被更新，修饰符const可以放在类名后面，也可以放在类名前面。<BR><BR>　　常指针和常引用<BR><BR>　　1. 常指针<BR><BR>　　使用const修饰指针时，由于const的位置不同，而含意不同。下面举两个例子，说明它们的区别。<BR><BR>　　下面定义的一个指向字符串的常量指针：<BR><BR>　　char * const prt1 = stringprt1;<BR><BR>　　其中，ptr1是一个常量指针。因此，下面赋值是非法的。<BR><BR>　　ptr1 = stringprt2;<BR><BR>　　而下面的赋值是合法的：<BR><BR>　　*ptr1 = "m";<BR><BR>　　<FONT color=#0000ff>因为指针ptr1所指向的变量是可以更新的，不可更新的是常量指针ptr1所指的方向(别的字符串)，也就是指向的地址不可改变。</FONT><BR><BR>　　下面定义了一个指向字符串常量的指针：<BR><BR>　　const * ptr2 = stringprt1;<BR><BR>　　其中，ptr2是一个指向字符串常量的指针。ptr2所指向的字符串不能更新的，而ptr2是可以更新的。因此，<BR><BR>　　*ptr2 = "x";<BR><BR>　　是非法的，而：<BR><BR>　　ptr2 = stringptr2;<BR><BR>　　是合法的。<BR><BR>　　所以，在使用const修饰指针时，应该注意const的位置。定义一个指向字符串的指针常量和定义一个指向字符串常量的指针时，const修饰符的位置不同，前者const放在*和指针名之间，后者const放在类型说明符前。<BR><BR>　　2. 常引用<BR><BR>　　使用const修饰符也可以说明引用，被说明的引用为常引用，该引用所引用的对象不能被更新。其定义格式如下：<BR><BR>　　const &lt;类型说明符&gt; &amp; &lt;引用名&gt;<BR><BR>　　例如：<BR><BR>　　const double &amp; v;<BR><BR>　　在实际应用中，常指针和常引用往往用来作函数的形参，这样的参数称为常参数。<BR><BR>　　在C++面向对象的程序设计中，指针和引用使用得较多，其中使用const修饰的常指针和常引用用得更多。使用常参数则表明该函数不会更新某个参数所指向或所引用的对象，这样，在参数传递过程中就不需要执行拷贝初始化构造函数，这将会改善程序的运行效率。<BR><BR>　　下面举一例子说明常指针作函数参数的作法。<BR><BR>
<TABLE width=550 align=center bgColor=#ebe9eb border=0>
<TBODY>
<TR>
<TD><B>#include &lt;iostream&gt;<IOSTREAM.H><BR>const int N = 6;<BR>void print(const int *p, int n);<BR>using namespace std;<BR>int&nbsp;main()<BR>{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int array[N];<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (int i = 0; i &lt; N;<N; i++)<br> i++)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cin&gt;&gt;array[i];<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print(array, N);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 0;<BR>}<BR><BR>void print(const int *p, int n)<BR>{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cout&lt;&lt;"{"&lt;&lt;*p;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (int i=1; i &lt; n; i++)<BR><N; i++)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cout&lt;&lt;","&lt;&lt;*(p+i);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cout&lt;&lt;"}"&lt;&lt;endl;<BR><ENDL;<BR>&nbsp;}<BR></B></TD></TR></TBODY></TABLE><BR>　　<B>常成员函数</B><BR><BR>　　使用const关键字进行说明的成员函数，称为常成员函数。只有常成员函数才有资格操作常量或常对象，没有使用const关键字说明的成员函数不能用来操作常对象。常成员函数说明格式如下：<BR><BR>　　&lt;类型说明符&gt; &lt;函数名&gt; (&lt;参数表&gt;) const；<BR><BR>其中，const是加在函数说明后面的类型修饰符，它是函数类型的一个组成部分，因此，在函数实现部分也要带const关键字。下面举一例子说明常成员函数的特征。<BR><BR>
<TABLE width=550 align=center bgColor=#ebe9eb border=0>
<TBODY>
<TR>
<TD><B>#include &lt;iostream&gt;<IOSTREAM.H><BR>class R<BR>{<BR>public:<BR>R(int r1, int r2) { R1=r1; R2=r2; }<BR>void print();<BR>void print() const;<BR>private:<BR>int R1, R2;<BR>};<BR><BR>void R::print()<BR>{<BR>cout&lt;<R1<<","<<R2<<ENDL;<BR>&lt;R1&lt;&lt;","&lt;&lt;R2&lt;&lt;endl;<BR>}<BR><BR>void R::print() const<BR>{<BR>cout&lt;&lt;R1&lt;&lt;","&lt;&lt;R2&lt;&lt;endl;<BR><R1<<";"<<R2<<ENDL;<BR>&nbsp;}<BR><BR>void main()<BR>{<BR>R a(5, 4);<BR>a.print();<BR>const R b(20, 52);<BR>b.print();<BR>}<BR></B></TD></TR></TBODY></TABLE><BR>　　该例子的输出结果为：<BR><BR>　　5,4<BR>　　20;52<BR><BR>　　该程序的类声明了两个成员函数，其类型是不同的(其实就是重载成员函数)。有带const修饰符的成员函数处理const常量，这也体现出函数重载的特点。<BR><BR>　　常数据成员<BR><BR>　　类型修饰符const不仅可以说明成员函数，也可以说明数据成员。<BR><BR>　　由于const类型对象必须被初始化，并且不能更新，因此，在类中说明了const数据成员时，只能通过成员初始化列表的方式来生成构造函数对数据成员初始化。<BR><BR>　　下面通过一个例子讲述使用成员初始化列表来生成构造函数。<BR><BR>
<TABLE width=550 align=center bgColor=#ebe9eb border=0>
<TBODY>
<TR>
<TD><B>#include &lt;iostream&gt;<BR>using namespace std;<IOSTREAM.H><BR>class A<BR>{<BR>public:<BR>A(int i);<BR>void print();<BR>const int &amp;r;<BR>private:<BR>const int a;<BR>static const int b;<BR>};<BR><BR>const int A::b=10;<BR>A::A(int i):a(i), r(a)<BR>{<BR>}<BR><BR>void A::print()<BR>{<BR>cout&lt;&lt;a&lt;&lt;","&lt;&lt;b","&lt;&lt;r&lt;&lt;endl;<?xml:namespace prefix = a<<" /><a<<":"<<b<<":"<<r<<endl;<br><BR>}<BR>int&nbsp;main()<BR>{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A a1(100), a2(0);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a1.print();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a2.print();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 0;<BR>}<BR></B></TD></TR></TBODY></TABLE><BR>　　该程序的运行结果为：<BR><BR>　　100:10:100<BR>　　　0:10:0<BR><BR>　　在该程序中，说明了如下三个常类型数据成员：<BR><BR>　　const int &amp; r;<BR><BR>　　const int a;<BR><BR>　　static const int b;<BR><BR>　　其中，r是常int型引用，a是常int型变量，b是静态常int型变量。<BR><BR>　　程序中对静态数据成员b进行初始化。<BR><BR>　　值得注意的是构造函数的格式如下所示：<BR><BR>　　A(int i):a(i),r(a)<BR>　　{<BR>　　}<BR><BR>　　其中，冒号后边是一个数据成员初始化列表，它包含两个初始化项，用逗号进行了分隔，因为数据成员a和r都是常类型的，需要采用初始化格式。<BR></a<<":"<<b<<":"<<r<<endl;<br><img src ="http://www.cnitblog.com/jackrain/aggbug/1376.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/jackrain/" target="_blank">这里的黄昏静悄悄</a> 2005-08-07 09:44 <a href="http://www.cnitblog.com/jackrain/archive/2005/08/07/1376.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>古城之谜</title><link>http://www.cnitblog.com/jackrain/archive/2005/07/31/1218.html</link><dc:creator>这里的黄昏静悄悄</dc:creator><author>这里的黄昏静悄悄</author><pubDate>Sun, 31 Jul 2005 00:54:00 GMT</pubDate><guid>http://www.cnitblog.com/jackrain/archive/2005/07/31/1218.html</guid><wfw:comment>http://www.cnitblog.com/jackrain/comments/1218.html</wfw:comment><comments>http://www.cnitblog.com/jackrain/archive/2005/07/31/1218.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/jackrain/comments/commentRss/1218.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/jackrain/services/trackbacks/1218.html</trackback:ping><description><![CDATA[<SPAN id=txtObj_0><FONT color=#0000ff>古城之谜(LostCity)</FONT><BR>著名的考古学家石教授在云梦高原上发现了一处古代城市遗址。让教授欣喜的是在这个他称为冰峰城(Ice-Peak City)的城市中有12块巨大石碑，上面刻着用某种文字书写的资料，他称这种文字为冰峰文。然而当教授试图再次找到冰峰城时，却屡屡无功而返。<BR>幸好当时教授把石碑上的文字都拍摄了下来，为了解开冰峰城的秘密，教授和他的助手牛博士开始研究冰峰文，发现冰峰文只有陈述句这一种句型和名词(n)、动词(v)、辅词(a)这三类单词，且其文法很简单：<BR><FONT color=#0000ff>&lt;文章&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;::= &lt;句子&gt; { &lt;句子&gt; }<BR>&lt;句子&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;::= &lt;陈述句&gt;<BR>&lt;陈述句&gt;&nbsp;&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;&nbsp;&lt;名词短语&gt; { &lt;动词短语&gt; &lt;名词短语&gt; } [ &lt;动词短语&gt; ]<BR>&lt;名词短语&gt;&nbsp;&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;&nbsp;&lt;名词&gt; | [ &lt;辅词&gt; ] &lt;名词短语&gt;<BR>&lt;动词短语&gt;&nbsp;&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;&nbsp;&lt;动词&gt; | [ &lt;辅词&gt; ] &lt;动词短语&gt;<BR>&lt;单词&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;::=&nbsp;&nbsp;&nbsp;&nbsp;&lt;名词&gt; | &lt;动词&gt; | &lt;辅词&gt;<BR></FONT>注：其中&lt;名词&gt;、&lt;动词&gt;和&lt;辅词&gt;由词典给出，“::=”表示定义为，“|”表示或，{}内的项可以重复任意多次或不出现，[]内的项可以出现一次或不出现。<BR>在研究了大量资料后，他们总结了一部冰峰文词典，由于冰峰文恰好有26个字母，为了研究方便，用字母a到z表示它们。<BR>冰峰文在句子和句子之间以及单词和单词之间没有任何分隔符，因此划分单词和句子令石教授和牛博士感到非常麻烦，于是他们想到了使用计算机来帮助解决这个问题。假设你接受了这份工作，你的第一个任务是写一个程序，将一篇冰峰文文章划分为最少的句子，在这个前提下，将文章划分为最少的单词。<BR><BR>[输入文件]<BR>l&nbsp;&nbsp;&nbsp;&nbsp;输入文件第1行为词典中的单词数n（n&lt;=1000）。<BR>l&nbsp;&nbsp;&nbsp;&nbsp;输入文件第2行至第(n+1)行每行表示一个单词，形为“α.mot”， α表示词性，可能是n(名词),v（动词）,a（辅词）中的一个，mot为单词，单词的长度不超过20。拼写相同而词性不同的单词视为不同的单词，如输入示例中的n.kick与v.kick是两个不同的单词。<BR>l&nbsp;&nbsp;&nbsp;&nbsp;输入文件第(n+2)行为需要划分的文章，以“.”结束。<BR>l&nbsp;&nbsp;&nbsp;&nbsp;输入文件中的文章确保为冰峰文。文章是由有限个句子组成的，每个句子只包含有限个单词。文章长度不超过5KB。<BR><BR>[输出文件]<BR>l&nbsp;&nbsp;&nbsp;&nbsp;输出文件为两行，每行一个整数。<BR>l&nbsp;&nbsp;&nbsp;&nbsp;输出文件第1行为划分出来的句子数。<BR>l&nbsp;&nbsp;&nbsp;&nbsp;输出文件第2行为划分出来的单词数。<BR><BR><BR>[输入输出文件样例]<BR><FONT color=#a9a9a9>Input.txt<BR>11<BR>n.table<BR>n.baleine<BR>a.silly<BR>n.snoopy<BR>n.sillysnoopy<BR>v.is<BR>v.isnot<BR>n.kick<BR>v.kick<BR>a.big<BR>v.cry<BR>sillysnoopyisnotbigtablebaleinekicksnoopysillycry.<BR></FONT><FONT color=#ff1493>Output.txt<BR>2<BR>9<BR></FONT><BR>[样例说明]<BR>（为了阅读方便，划分的单词用空格分隔，在单词的右上角标出它的词性，每行写一个句子，用句号表示句子结束。）<BR>输出对应的划分：<BR><FONT color=#0000ff>sillysnoopyn isnotv biga tablen.<BR>baleinen kickv snoopyn sillya cryv.</FONT><BR><BR>如果用下面的划分：<BR>sillya snoopyn isnotv biga tablen.<BR>baleinen kickv snoopyn sillya cryv.<BR>则划分的句子数仍为2个，但单词数却多了1个，为10个，显然应该按前者而不是后者划分。</SPAN><img src ="http://www.cnitblog.com/jackrain/aggbug/1218.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/jackrain/" target="_blank">这里的黄昏静悄悄</a> 2005-07-31 08:54 <a href="http://www.cnitblog.com/jackrain/archive/2005/07/31/1218.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>