全文预览已结束
付费下载
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
第第 4 章习题参考答案章习题参考答案 1 单项选择题 单项选择题 1 D 2 D 3 D 4 B 5 D 6 B 7 A 8 D 9 C 10 D 11 B 12 D 13 A 14 B 2 填空题 填空题 1 2 2 嵌套 递归 3 全局变量 局部变量 静态变量 动态变量 4 auto static register extern 5 外部变量 6 编译 运行 3 阅读程序 指出结果 阅读程序 指出结果 1 15 2 5 3 5 4 3 4 i 5 i 2 i 2 i 4 i 2 5 求水仙花数 6 5 5 5 7 30 8 0 10 1 11 2 12 4 程序填空 程序填空 1 float fun float float x y x y z y z y 2 x x x 1 3 s 0 a a b 5 编程题 编程题 1 include unsigned int fun unsigned int int main unsigned int s scanf u printf u n fun s return 0 unsigned int fun unsigned int s unsigned int p 0 while s 0 p p s 10 s s 10 return p 2 include include include void f1 float float float float void f2 float float float float void f3 float float float float int main float a b c d scanf f f f if a 0 printf 不是一元二次方程 n exit 0 d b b 4 a c if d 0 f1 a b c d else if d 0 f2 a b c d else f3 a b c d return 0 void f1 float a float b float c float d float x1 x2 x1 b sqrt d 2 a x2 b sqrt d 2 a printf 2f 2f n x1 x2 void f2 float a float b float c float d float x1 x2 x1 b 2 a x2 b 2 a printf 2f 2f n x1 x2 void f3 float a float b float c float d float x1 x2 x1 b 2 a x2 sqrt d 2 a printf 2f i 2f n x1 x2 printf 2f i 2f n x1 x2 3 include double p int double int main int n double x do scanf d while n 0 scanf lf printf lf n p n x return 0 double p int n double x double pn if n 0 pn 1 else if n 1 pn x else pn 2 n 1 x p n 1 x n 1 p n 2 x n return pn 4 include define RATE 0 053 double fun float void display float int int main float dep int season scanf f d display dep season return 0 double fun float d return d RATE void display float d int s int i printf 季度 利息 余额 n printf n for i 1 i s i printf 4d 2f 2f n i fun d fun d i d printf n 5 include double fun void int main printf lf n fun return 0 double fun void double s 0 int n 1 while double 2 n 1 2 n 2 n 1e 4 s s double 2 n 1 2 n 2 n n return s 6 include int fun int int main int w scanf
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 服务类英文课件
- 服务类项目课件
- 房屋加固专家评审课件
- 防蚊的方法课件
- 风温病教学课件
- 防烫伤安全小班课件
- 法庭模拟课件
- 2026事业单位综合岗面试专业面试易错题试卷及答案
- 防突管理体系建设课件
- 防台防汛方案课件
- 2026北京市朝阳区卫生健康委员会所属事业单位第二批招聘241人笔试备考题库及答案解析
- 4.1妈妈教学设计
- 2026年内蒙古中考语文试卷及答案
- 成人术中外周静脉输液技术操作及管理指南
- 八年级物理第二学期期中考试质量分析
- 2026-2030中国化机浆市场竞争规划与未来前景发展趋势研究报告
- 2026粉末冶金开发高速钢刀片脱模剂适用性分析报告
- 三角函数压轴题专项训练-2026年高考数学 含答案
- 矩阵论知到智慧树期末考试答案题库2025年哈尔滨工程大学
- 人体发育学 第八章 婴幼儿期言语功能的发育
- 手术室护理进修
评论
0/150
提交评论