example1-3.htm

来自「Visual C++面向对象程序设计教程(配套习题资源)」· HTM 代码 · 共 32 行

HTM
32
字号
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>例1-3</title>
</head>

<body>

<p style="line-height: 150%; margin-top: 0; margin-bottom: 0"><font size="2">#include  &lt;iostream.h><br> 
void  main( )<br> 
{<br>
	int  number=1234;<br> 
	cout  &lt;&lt;"Decimal:"&lt;&lt;dec&lt;&lt;number&lt;&lt;endl<br> 
	         &lt;&lt;"Hexadecimal:"&lt;&lt;hex&lt;&lt;number&lt;&lt;" "&lt;&lt;number*number&lt;&lt;endl<br> 
	         &lt;&lt;"Octal:"&lt;&lt;oct&lt;&lt;number&lt;&lt;" "&lt;&lt;number*number&lt;&lt;endl;<br> 
}</font></p>
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0"> </p>
<p ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0"><font FACE="??ì?,SimSun" LANG="ZH-CN" size="2">程序输出结果是:</font></p>
<p ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0"><font size="2">Decimal:1234</font></p>
<p ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0"><font size="2">Hexadecimal:4d2 
173c44</font></p>
<p ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0"><font size="2">Octal:2322 
5636104</font></p>
<p> </p>

</body>

</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?