⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xt1.htm

📁 有关C++程序设计的复习资料
💻 HTM
📖 第 1 页 / 共 2 页
字号:
style="Z-INDEX: 2; LEFT: 512px; VISIBILITY: hidden; WIDTH: 70px; POSITION: absolute; TOP: 190px; HEIGHT: 64px">
<TABLE cellSpacing=0 cellPadding=0 width=70 border=0>
  <TBODY>
  <TR>
    <TD><A href="http://www.nuist.edu.cn/JSJ/syjx/sy.htm"><IMG height=32 
      src="xt1.files/sy1.gif" width=70 border=0></A></TD></TR>
  <TR>
    <TD><A href="http://www.nuist.edu.cn/JSJ/syjx/sjdg.htm"><IMG height=32 
      src="xt1.files/sy2.gif" width=70 border=0></A></TD></TR></TBODY></TABLE></DIV>
<TABLE cellSpacing=0 cellPadding=0 width=777 border=0><!--DWLayoutTable-->
  <TBODY>
  <TR>
    <TD vAlign=top colSpan=3 height=148><IMG height=148 
      src="xt1.files/maintop.gif" width=777></TD></TR>
  <TR>
    <TD vAlign=top colSpan=3 height=32><IMG height=32 
      src="xt1.files/hard_03.gif" width=778 useMap=#Map border=0> </TD></TR>
  <TR>
    <TD vAlign=top width=181 height=164>
      <TABLE cellSpacing=0 cellPadding=0 width="100%" align=right border=0><!--DWLayoutTable-->
        <TBODY>
        <TR>
          <TD vAlign=top colSpan=2 height=30><IMG height=30 
            src="xt1.files/gai_02.gif" width=177></TD></TR>
        <TR>
          <TD width=41 height=4></TD>
          <TD width=134></TD></TR>
        <TR>
          <TD height=26>
            <DIV align=right><IMG height=15 src="xt1.files/article_common.gif" 
            width=9></DIV></TD>
          <TD>
            <DIV align=left><A class=mb14 
            href="http://www.nuist.edu.cn/JSJ/syjx/sbcl.htm"> 申报材料</A></DIV></TD></TR>
        <TR>
          <TD height=26>
            <DIV align=right><IMG height=15 src="xt1.files/article_common.gif" 
            width=9></DIV></TD>
          <TD>
            <DIV align=left><A class=mb14 
            href="http://www.nuist.edu.cn/JSJ/syjx/szll.htm"> 师资力量</A></DIV></TD></TR>
        <TR>
          <TD height=26>
            <DIV align=right><IMG height=15 src="xt1.files/article_common.gif" 
            width=9></DIV></TD>
          <TD>
            <DIV align=center>
            <P align=left><A class=mb14 
            href="http://www.nuist.edu.cn/JSJ/syjx/jxcg.htm"> 教学成果</A></P></DIV></TD></TR>
        <TR>
          <TD height=26>
            <DIV align=right><IMG height=15 src="xt1.files/article_common.gif" 
            width=9></DIV></TD>
          <TD>
            <DIV align=left><A 
            href="http://www.nuist.edu.cn/JSJ/syjx/jxkh.htm"> 教学考核</A></DIV></TD></TR>
        <TR>
          <TD height=26>
            <DIV align=right><IMG height=15 src="xt1.files/article_common.gif" 
            width=9></DIV></TD>
          <TD>
            <DIV align=left><A class=mb14 
            href="http://www.nuist.edu.cn/JSJ/syjx/zwpj.htm"> 自我评价</A></DIV></TD></TR>
        <TR>
          <TD height=26>
            <DIV align=right><IMG height=15 src="xt1.files/article_common.gif" 
            width=9></DIV></TD>
          <TD>
            <DIV align=left><A class=mb14 
            href="http://www.nuist.edu.cn/JSJ/syjx/jsgh.htm"> 建设规划</A></DIV></TD></TR>
        <TR>
          <TD height=26>
            <DIV align=right><IMG height=15 src="xt1.files/article_common.gif" 
            width=9></DIV></TD>
          <TD>
            <DIV align=left><A class=mb14 
            href="http://www.nuist.edu.cn/JSJ/syjx/jcxy.htm"> 教材选用</A></DIV></TD></TR>
        <TR>
          <TD height=2></TD>
          <TD></TD></TR></TBODY></TABLE></TD>
    <TD vAlign=top colSpan=2>
      <TABLE class=bg height=241 cellSpacing=0 cellPadding=0 width="100%" 
      border=0>
        <TBODY>
        <TR>
          <TD width="11%" height=33><IMG height=34 src="xt1.files/homedha.gif" 
            width=55><IMG height=34 src="xt1.files/homedhbg.gif" width=8></TD>
          <TD 
            width="89%"><!-- InstanceBeginEditable name="EditRegion4" --><SPAN 
            class=s14><STRONG>习题一</STRONG></SPAN><!-- InstanceEndEditable --></TD></TR>
        <TR>
          <TD colSpan=2><!-- InstanceBeginEditable name="EditRegion5" -->
            <TABLE cellSpacing=1 cellPadding=1 width="100%" border=1>
              <TBODY>
              <TR>
                <TD>
                  <DIV align=center>第1章 C++概述</DIV></TD></TR>
              <TR>
                <TD>
                  <DIV align=left>
                  <P><BR><SPAN class=xt12>1.1 
                  简述C++语言程序的结构特点。<BR>答:(1)C++程序由一个或多个函数组成,其中至少有一个主函数main(),程序从主函数开始执行,由主函数来调用其他函数。<BR>(2)C++函数由说明部分与函数体组成,函数体由变量定义和执行语句两部分组成。其中函数体中语句和变量说明以分号结束。一般函数结构如下:<BR># 
                  编译预处理命令<BR>函数类型 &lt;函数名&gt;(形式参数)<BR>{ <BR> 变量说明; /* 
                  注释*/<BR> 执行语句; // 注释内容<BR>} 
                  <BR>(3)程序书写规则为同一层语句同列书写、内层语句缩进两个字符、函数定义在第一列书写。严格区分字母的大小写,即大写与小写代表两个不同变量。<BR>(4)C++输入/输出通过流cin和cout来实现的 
                  </SPAN></P></DIV>
                  <P class=xt12>1.2 
                  简述C++程序开发的步骤。<BR>答:(1)分析问题。根据实际问题,分析需求,确定解决方法,并用适当的工具描述它。<BR>(2)编辑程序。编写C++源程序,并利用一个编辑器将源程序输入到计算机中的某一个文件中。文件的扩展名为.cpp。<BR>(3)编译程序。编译源程序,产生目标程序。文件的扩展名为.obj。<BR>(4)连接程序。将一个或多个目标程序与库函数进行连接后,产生一个可执行文件。文件的扩展名为.exe。<BR>(5)运行调试程序。运行可执行文件,分析运行结果。若有错误进行调试修改。<BR>在编译、连接和运行程序过程中,都有可能出现错误,此时要修改源程序,并重复以上过程,直到得到正确的结果为止。</P>
                  <P 
                  class=xt12>1.3设计一个C++程序,输出以下信息:<BR>***************<BR>Hello!<BR>***************<BR>解:<BR># 
                  include &lt;iostream.h&gt;<BR>main()<BR>{ cout&lt;&lt;" 
                  ***************"&lt;&lt;'\n';<BR> cout&lt;&lt;" 
                  Hello!"&lt;&lt;'\n';<BR> cout&lt;&lt;" 
                  ***************"&lt;&lt;'\n';<BR>}</P>
                  <P class=xt12>1.4设计一个C++程序,输入三个学生的成绩,求其总成绩。<BR>解:<BR># include 
                  &lt;iostream.h&gt;<BR>main()<BR>{ int 
                  s1,s2,s3,sum;<BR> cout&lt;&lt;"请输入三个学生的成绩:";<BR> cin&gt;&gt;s1&gt;&gt;s2&gt;&gt;s3;<BR> sum=s1+s2+s3;<BR> cout&lt;&lt;"sum="&lt;&lt;sum&lt;&lt;'\n';<BR>}</P>
                  <P><SPAN 
                  class=xt12>1.5设计一个C++程序,输入a、b两个整数,输出其中的最小数。<BR>解:<BR>#include 
                  &lt;iostream.h&gt;<BR>void main(void)<BR>{ int min(int x,int 
                  y);<BR> int a,b,m;<BR> cout&lt;&lt;"Input 
                  a,b:";<BR> cin&gt;&gt;a&gt;&gt;b;<BR> m=min(a,b);<BR> cout&lt;&lt;"min="&lt;&lt;m&lt;&lt;endl;<BR>}<BR>int 
                  min(int x,int y)<BR>{ int z;<BR> if (x&lt;y) z=x;<BR> else 
                  z=y;<BR> return(z);<BR>}</SPAN><BR><BR></P></TD></TR></TBODY></TABLE><!-- InstanceEndEditable --></TD></TR></TBODY></TABLE></TD></TR>
  <TR vAlign=center bgColor=#eeeeee>
    <TD colSpan=3 height=28>
      <DIV align=center><A 
      onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.nuist.edu.cn')" 
      href="http://www.nuist.edu.cn/JSJ/syjx/xt/xt1.htm#"><SPAN 
      class=mb14>设为首页</SPAN></A><STRONG>|</STRONG><A class=mb14 
      href="javascript:addme()">加入收藏</A><STRONG>|</STRONG><A 
      href="http://www.nuist.edu.cn/"><SPAN 
      class=mb14>学校首页</SPAN></A><STRONG>|</STRONG><A 
      href="http://www.nuist.edu.cn/jsj"><SPAN 
    class=mb14>计科系首页</SPAN></A></DIV></TD></TR>
  <TR>
    <TD class=mb14 vAlign=top bgColor=#176bab colSpan=2 height=88>
      <DIV align=center><BR><FONT color=#ffffff>Copyright&copy; 2004-2005 Depart of 
      Computer Science &amp; Technology Nuist</FONT></DIV></TD>
    <TD width=15 bgColor=#176bab>&nbsp;</TD></TR>
  <TR>
    <TD height=1></TD>
    <TD width=581></TD>
    <TD></TD></TR></TBODY></TABLE><MAP name=Map><AREA shape=RECT coords=9,9,75,25 
  href="http://www.nuist.edu.cn/JSJ/syjx/index.htm"><AREA shape=RECT 
  coords=86,9,150,26 href="http://www.nuist.edu.cn/JSJ/syjx/jxdg.htm"><AREA 
  shape=RECT coords=157,9,220,27 
  href="http://www.nuist.edu.cn/JSJ/syjx/skja.htm"><AREA shape=RECT 
  coords=230,9,310,26 href="http://www.nuist.edu.cn/JSJ/syjx/dmt.htm"><AREA 
  onclick="MM_goToURL('parent','../xt.htm');return document.MM_returnValue" 
  shape=RECT coords=320,10,397,26 
  href="http://www.nuist.edu.cn/JSJ/syjx/xt.htm"><AREA 
  onclick="MM_showHideLayers('Layer1','','hide','Layer2','','show')" shape=RECT 
  coords=405,10,469,25 href="http://www.nuist.edu.cn/JSJ/syjx/xt/xt1.htm#"><AREA 
  onclick="MM_showHideLayers('Layer1','','show','Layer2','','hide')" shape=RECT 
  coords=476,10,538,26 href="http://www.nuist.edu.cn/JSJ/syjx/xt/xt1.htm#"><AREA 
  shape=RECT coords=549,10,612,26 
  href="http://www.nuist.edu.cn/JSJ/syjx/ckwx.htm"><AREA shape=RECT 
  coords=620,9,684,26 
href="http://www.nuist.edu.cn/JSJ/syjx/zlxz.htm"></MAP></CENTER><!-- InstanceEnd --></BODY></HTML>

⌨️ 快捷键说明

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