📄 page_557.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>page_557</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_556.html">< previous page</a></td> <td align="center" width="40%" style="background: #EEF3E2"><strong style="color: #2F4F4F; font-size: 120%;">page_557</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_558.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 557</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">聽聽聽聽//聽Print聽result<br /><br />聽聽聽聽cout聽<聽The聽result聽is聽equal聽to<br />聽聽聽聽聽聽聽聽聽<聽setprecision(7)聽<聽area聽<聽endl;<br />聽聽聽聽return聽0;<br />}<br /><br />//******************************************************************<br /><br />void聽GetData(聽/*聽out聽*/聽float&聽low,聽聽聽聽聽聽聽聽聽//聽Bottom聽of聽interval<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽/*聽out聽*/聽float&聽high,聽聽聽聽聽聽聽聽//聽Top聽of聽interval<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽/*聽out聽*/聽int&聽聽聽divisions聽)聽聽//聽Division聽factor<br /><br />//聽Prompts聽for聽the聽input聽of聽low,聽high,聽and聽divisions聽values<br />//聽and聽returns聽the聽three聽values聽after聽echo聽printing聽them<br /><br />//聽Postcondition:<br />//聽聽聽聽聽All聽parameters聽(low,聽high,聽and聽divisions)<br />//聽聽聽聽聽have聽been聽prompted聽for,聽input,聽and聽echo聽printed<br /><br />{<br />聽聽聽聽cout聽<聽Enter聽low聽and聽high聽values聽of聽desired聽interval<br />聽聽聽聽聽聽聽聽聽<聽聽(floating聽point).聽<聽endl;<br />聽聽聽聽cin聽>>聽low聽>>聽high;<br />聽聽聽聽cout聽<聽Enter聽the聽number聽of聽divisions聽to聽be聽used聽(integer).<br />聽聽聽聽聽聽聽聽聽<聽endl;<br />聽聽聽聽cin聽>>聽divisions;<br />聽聽聽聽cout聽<聽The聽area聽is聽computed聽over聽the聽interval聽<br />聽聽聽聽聽聽聽聽聽<聽setprecision(7)聽<聽low聽<聽endl<br />聽聽聽聽聽聽聽聽聽<聽to聽<聽high聽<聽聽with聽聽<divisions<br />聽聽聽聽聽聽聽聽聽<聽聽subdivisions聽of聽the聽interval.聽<聽endl;<br />}<br /><br />//******************************************************************<br /><br />float聽RectArea(聽/*聽in聽*/聽float聽leftEdge,聽聽聽聽//聽Left聽edge聽point聽of<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽//聽聽聽rectangle<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽/*聽in聽*/聽float聽width聽聽聽聽)聽聽聽//聽Width聽of聽rectangle<br />//聽Computes聽the聽area聽of聽a聽rectangle聽that聽starts聽at聽leftEdge聽and聽is<br />//width聽units聽wide.聽The聽rectangle's聽height聽is聽given聽by聽the聽value<br />//聽computed聽by聽Funct聽at聽the聽horizontal聽midpoint聽of聽the聽rectangle<br /><br />//聽Precondition:<br />//聽聽聽聽聽leftEdge聽and聽width聽are聽assigned<br />//聽Postcondition:<br />//聽聽聽聽聽Function聽value聽==聽area聽of聽specified聽rectangle<br /></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_556.html">< previous page</a></td> <td align="center" width="40%" style="background: #EEF3E2"><strong style="color: #2F4F4F; font-size: 120%;">page_557</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_558.html">next page ></a></td> </tr> </table> </body> </html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -