📄 page_1131.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>page_1131</title> <link rel="stylesheet" href="reset.css" type="text/css" media="all"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> </head> <body> <table summary="top nav" border="0" width="100%"> <tr> <td align="left" width="30%" style="background: #EEF3E2"><a style="color: blue; font-size: 120%; font-weight: bold; text-decoration: none; font-family: verdana;" href="page_1130.html">< previous page</a></td> <td align="center" width="40%" style="background: #EEF3E2"><strong style="color: #2F4F4F; font-size: 120%;">page_1131</strong></td> <td align="right" width="30%" style="background: #EEF3E2"><a style="color: blue; font-size: 120%; font-weight: bold; text-decoration: none; font-family: verdana;" href="page_1132.html">next page ></a></td> </tr> <tr> <td align="left" colspan="3" style="background: #ffffff; padding: 20px;"> <table border="0" width="100%" cellpadding="0"><tr><td align="center"> <table border="0" cellpadding="2" cellspacing="0" width="100%"><tr><td align="left"></td> <td align="right"></td> </tr></table></td></tr><tr><td align="left"><p></p><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td align="right"><font face="Times New Roman, Times, Serif" size="2" color="#FF0000">Page 1131</font></td></tr></table><table border="0" cellspacing="0" cellpadding="0"><tr><td rowspan="5"></td> <td colspan="3" height="12"></td> <td rowspan="5"></td></tr><tr><td colspan="3"></td></tr><tr><td></td> <td><font face="Courier New, Courier, Mono New, Courier, Mono" size="2">//聽Precondition:<br />//聽聽聽聽聽All聽parameters聽are聽assigned聽聽&&聽聽circleCount聽>=聽0<br />//聽Postcondition:<br />//聽聽聽聽聽The聽values聽of聽all聽parameters聽have聽been聽printed<br />//聽聽&&聽IF聽circleCount聽>聽0<br />//聽聽聽聽聽聽聽聽聽circleCount聽circles聽have聽been聽moved聽from聽beginPeg聽to<br />//聽聽聽聽聽聽聽聽聽endPeg聽in聽the聽manner聽detailed聽above<br />//聽聽聽聽聽ELSE<br />//聽聽聽聽聽聽聽聽聽No聽further聽actions聽have聽taken聽place<br /><br />{<br />聽聽聽聽cout聽<<聽setw(6)聽<<聽circleCount聽<<聽setw(9)聽<<聽beginPeg<br />聽聽聽聽聽聽聽聽聽<<聽setw(7)聽<<聽auxPeg聽<<聽setw(7)聽<<聽endPeg聽<<聽endl;<br />聽聽聽聽if聽(circleCount聽>聽0)<br />聽聽聽聽{<br />聽聽聽聽聽聽聽聽cout聽<<聽From聽聽first:;<br />聽聽聽聽聽聽聽聽DoTowers(circleCount聽-1,聽beginPeg,聽endPeg,聽auxPeg);<br />聽聽聽聽聽聽聽聽cout聽<<聽setw(58)聽<<聽Move聽circle聽聽<<聽circleCount<br />聽聽聽聽聽聽聽聽聽聽聽聽聽<<聽聽from聽<<聽beginPeg聽<<聽聽to聽聽<<聽endPeg聽<<聽endl;<br />聽聽聽聽聽聽聽聽cout聽<<聽From聽second:;<br />聽聽聽聽聽聽聽聽DoTowers(circleCount聽-聽1,聽auxPeg,聽beginPeg,聽endPeg);<br />聽聽聽聽}<br />}</font></td><td></td></tr><tr><td colspan="3"></td></tr><tr><td colspan="3" height="1"></td></tr></table><table border="0" cellspacing="0" cellpadding="0"><tr><td rowspan="5"></td> <td colspan="3" height="12"></td> <td rowspan="5"></td></tr><tr><td colspan="3"></td></tr><tr><td></td> <td><font face="Times New Roman, Times, Serif" size="3">The output from a run with three circles follows. Original means that the parameters listed beside it are from the nonrecursive call, which is the first call to </font><font face="Courier New, Courier, Mono New, Courier, Mono" size="3">DoTowers</font><font face="Times New Roman, Times, Serif" size="3">. From first: means that the parameters listed are for a call issued from the first recursive statement. From second: means that the parameters listed are for a call issued from the second recursive statement. Notice that a call cannot be issued from the second recursive statement until the preceding call from the first recursive statement has completed execution.</font></td><td></td></tr><tr><td colspan="3"></td></tr><tr><td colspan="3" height="1"></td></tr></table><table border="0" cellspacing="0" cellpadding="0"><tr><td rowspan="5"></td> <td colspan="3" height="12"></td> <td rowspan="5"></td></tr><tr><td colspan="3"></td></tr><tr><td></td> <td><font face="Courier New, Courier, Mono New, Courier, Mono" size="2">OUTPUT聽WITH聽3聽CIRCLES<br /><br />CALLED聽FROM聽聽#CIRCLES聽BEGIN聽AUXIL.聽END聽聽聽INSTRUCTIONS<br /><br />Original聽聽聽:聽聽聽聽聽3聽聽聽聽聽聽1聽聽聽聽聽2聽聽聽聽聽3<br />From聽聽first:聽聽聽聽聽2聽聽聽聽聽聽1聽聽聽聽聽3聽聽聽聽聽2<br />From聽聽first:聽聽聽聽聽1聽聽聽聽聽聽1聽聽聽聽聽2聽聽聽聽聽3<br />From聽聽first:聽聽聽聽聽0聽聽聽聽聽聽1聽聽聽聽聽3聽聽聽聽聽2<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽Move聽circle聽1聽from聽1聽to聽3<br />From聽second:聽聽聽聽聽0聽聽聽聽聽聽2聽聽聽聽聽1聽聽聽聽聽3<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽Move聽circle聽2聽from聽1聽to聽2<br />From聽second:聽聽聽聽聽1聽聽聽聽聽聽3聽聽聽聽聽1聽聽聽聽聽2<br />From聽聽first:聽聽聽聽聽0聽聽聽聽聽聽3聽聽聽聽聽2聽聽聽聽聽1<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽Move聽circle聽1聽from聽3聽to聽2<br />From聽second:聽聽聽聽聽0聽聽聽聽聽聽1聽聽聽聽聽3聽聽聽聽聽2</font></td><td></td></tr><tr><td colspan="3"></td></tr><tr><td colspan="3" height="1"></td></tr></table></td></tr></table><p><font size="0"></font></p>聽 </td> </tr> <tr> <td align="left" width="30%" style="background: #EEF3E2"><a style="color: blue; font-size: 120%; font-weight: bold; text-decoration: none; font-family: verdana;" href="page_1130.html">< previous page</a></td> <td align="center" width="40%" style="background: #EEF3E2"><strong style="color: #2F4F4F; font-size: 120%;">page_1131</strong></td> <td align="right" width="30%" style="background: #EEF3E2"><a style="color: blue; font-size: 120%; font-weight: bold; text-decoration: none; font-family: verdana;" href="page_1132.html">next page ></a></td> </tr> </table> </body> </html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -