📄 right1-1.htm
字号:
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<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 章</title>
<base target="rbottom">
<style>
<!--
.右标题 { font-size: 10pt; color: #000080; text-indent: 0; margin: 0 }
.右内容 { font-size: 10pt; text-align: left; text-indent: 0; line-height: 100%; margin:
0 }
-->
</style>
</head>
<body>
<p style="line-height: 100%; margin-top: 0; margin-bottom: 0"> </p>
<p style="line-height: 100%; margin-top: 0; margin-bottom: 0"><span style="position: absolute; left: 8; top: -9"><img border="0" src="1.gif" width="63" height="70"></span></p>
<p style="line-height: 100%; margin-top: 0; margin-bottom: 0"> </p>
<p style="line-height: 100%; text-indent: 0; margin: 0" class="右标题" align="left">
<span style="background-color: #CCFF99">第 1 章</span><span style="background-color: #CCFF99">
</span>><span style="background-color: #CCFF99"> 第 1 节 </span>><span style="background-color: #CCFF99">
1.1 C++语言概述</span></p>
<hr color="#008000" size="1">
<p align="left" class="右内容" style="text-indent: 0; margin: 0"> </p>
<p align="left" class="右内容" style="text-indent: 0; line-height: 150%; margin: 0"><font size="2">C++<font FACE="??ì?,SimSun" LANG="ZH-CN">程序由编译预处理、程序主体和注释组成。下面是一个简单的</font>C++<font FACE="??ì?,SimSun" LANG="ZH-CN">程序。</font></font></p>
<p ALIGN="JUSTIFY" class="右内容" style="line-height: 150%; margin-top: 0; margin-bottom: 0"><font size="2"><font FACE="??ì?,SimSun" LANG="ZH-CN">【例</font>1-1<font FACE="??ì?,SimSun" LANG="ZH-CN">】一个简单的</font>C++<font FACE="??ì?,SimSun" LANG="ZH-CN">程序。</font></font></p>
<blockquote>
<blockquote>
<p ALIGN="JUSTIFY" class="右内容" style="line-height: 150%; margin-top: 0; margin-bottom: 0"><font size="2">#include <iostream.h></font></p>
<p ALIGN="JUSTIFY" class="右内容" style="line-height: 150%; margin-top: 0; margin-bottom: 0"><font size="2">void main( )</font></p>
<p ALIGN="JUSTIFY" class="右内容" style="line-height: 150%; margin-top: 0; margin-bottom: 0"><font size="2">{</font></p>
<p ALIGN="JUSTIFY" class="右内容" style="line-height: 150%; margin-top: 0; margin-bottom: 0"><font size="2">for (int i= 0 ; i < 3
; i++) { //<font FACE="??ì?,SimSun" LANG="ZH-CN">循环语句</font></font></p>
<p ALIGN="JUSTIFY" class="右内容" style="line-height: 150%; margin-top: 0; margin-bottom: 0"><font size="2">cout <<
"Hello! My friend!\n"; //<font FACE="??ì?,SimSun" LANG="ZH-CN">向屏幕输出</font>Hello!
My friend!</font></p>
<p ALIGN="JUSTIFY" class="右内容" style="line-height: 150%; margin-top: 0; margin-bottom: 0"><font size="2">}</font></p>
<p ALIGN="JUSTIFY" class="右内容" style="line-height: 150%; margin-top: 0; margin-bottom: 0"><font size="2">}</font></p>
</blockquote>
</blockquote>
<font SIZE="3">
<p class="右内容" style="line-height: 150%; margin-top: 0; margin-bottom: 0"></font><font size="2"><font FACE="??ì?,SimSun" LANG="ZH-CN">程序运行的结果是在屏幕上显示三行提示信息“</font>Hello!
My friend<font FACE="??ì?,SimSun" LANG="ZH-CN">!”。</font></font></p>
<p ALIGN="JUSTIFY" 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 size="2">C++<font FACE="??ì?,SimSun" LANG="ZH-CN">语言的基本数据类型有如下四种:</font></font></p>
<font SIZE="3">
<p ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0"></font><font size="2"><font FACE="??ì?,SimSun" LANG="ZH-CN">①
整型,说明符为</font>int<font FACE="??ì?,SimSun" LANG="ZH-CN">。</font></font></p>
<p ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0"><font size="2"><font FACE="??ì?,SimSun" LANG="ZH-CN">②
字符型,说明符为</font>char<font FACE="??ì?,SimSun" LANG="ZH-CN">。</font></font></p>
<font SIZE="3">
<p ALIGN="JUSTIFY" style="line-height: 150%; margin-top: 0; margin-bottom: 0"></font><font size="2"><font FACE="??ì?,SimSun" LANG="ZH-CN">③
浮点型(又称实型),说明符为</font>float<font FACE="??ì?,SimSun" LANG="ZH-CN">(单精度),</font>double<font FACE="??ì?,SimSun" LANG="ZH-CN">(双精度)。</font></font></p>
<font SIZE="3">
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0"></font><font size="2"><font FACE="??ì?,SimSun" LANG="ZH-CN">④
空值型,说明符为</font>void<font FACE="??ì?,SimSun" LANG="ZH-CN">,用于函数和指针。</font></font></p>
<hr size="1" color="#008000">
<p><span style="position: absolute; left: 27; top: 488"><img border="0" src="rightd1.gif" width="113" height="70"></span>
<span style="position: absolute; left: 496; top: 489"><a href="right1-2.htm" target="_self"><img border="0" src="rightd2.gif" width="124" height="63"></a></span></p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -