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

📄 course2-ex.htm

📁 WINDOWS程序设计 主讲教师:朱桂萍 沈瑜 清华大学电机系 电话:62782560
💻 HTM
字号:

  
<html>

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  <link rel="stylesheet" href="xCSS.css">
  <link rel="stylesheet" href="x_course.css">
</head>


<BODY bgColor=white leftMargin=6 topMargin=0>
<TABLE border=0 cellPadding=0 cellSpacing=0 width=558>
  <TBODY> 
  <TR> 
    <TD vAlign=top width=100%><BR>
      <DIV align=center class=xTitle> 
        <p align="left"><font face="Times New Roman, Times, serif" size="5" color="#000000">练习与思考题</font> 
        </p>
      </DIV>
      <P><font size="+1">1. 从键盘输入两个int型数,比较其大小,并输出显示其中小的。</font></P>
      <P><font size="+1">2. 从键盘输入一个 short int 型数,将其低8位(右8位)都置为1。</font><font size="+1">&nbsp;</font></P>
      <P><font size="+1">3. 输入一摄氏温度,编程输出华氏温度。计算公式如下:</font></P>
      <P><font size="+1">&nbsp;&nbsp;&nbsp;&nbsp;C = ( F - 32 ) *5 / 9</font></P>
      <P><font size="+1">4. 编程统计从键盘输入的字符中0~9每个数字的个数以及其它字符</font></P>
      <P><font size="+1">&nbsp;&nbsp;&nbsp;的个数,并以“$”作为输入结束符。(提示:用开关语句和循环</font></P>
      <P><font size="+1">&nbsp;&nbsp;&nbsp;语句)</font></P>
      <P><font size="+1">5. 编程求n!,n为整数,由键盘输入。(提示:函数的递归调用)</font></P>
      <P><font size="+1">6. 使用函数重载的方法分别求出两个int型数、两个浮点型数、两个</font></P>
      <P><font size="+1">&nbsp;&nbsp;&nbsp;复数的和。(提示:用结构表示复数)</font></P>
      <P><font size="+1">7. 已知二维字符数组s[ ][5] = { &quot;abcd&quot;,&quot;efgh&quot;,&quot;ijkl&quot;,&quot;mnop&quot;};使用字符</font></P>
      <P><font size="+1">&nbsp;&nbsp;&nbsp;串处理函数,将该数组的四个字符串连接起来,组成一个字符串:</font></P>
      <P><font size="+1">&nbsp;&nbsp;&nbsp;abcdefghijklmnop</font></P>
      </TD>
  </TR>
  <TR> 
    <TD align=middle width=100%><BR>
      <HR width=90%>
      <SPAN class=_9pt>清华大学电机系,2001</SPAN> <BR>
      <BR>
    </TD>
  </TR>
  </TBODY> 
</TABLE>
</BODY>

</html>

⌨️ 快捷键说明

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