c语言程序设计课后答案罗朝盛c语言程序设计课后答案_罗朝盛.doc

c语言程序设计课后答案罗朝盛c语言程序设计课后答案_罗朝盛.doc

  1. 1、本文档共39页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
c语言程序设计课后答案罗朝盛c语言程序设计课后答案_罗朝盛

第1章 习题参考答案 1. (略) 判断题 1 2 3 4 5 √ × √ × √ 填空题 main 函数的首部、函数体 {、} main、main 语句、分号(;) 选择题 1 2 3 4 5 C C C A B 选择题 #include stdio.h main() { int a, b, s; float t; printf(Enter A,B=?\n); scanf(%d%d, a, b); s=a+b; t=a*b; printf(s=%d, t=%f\n, s, t); } #include stdio.h main() { printf(=================\n); printf( Hello! \n); printf( How do you do \n); printf(=================\n); } (3) #include stdio.h main() { int r, h; float v; printf(Enter R, H=?\n); scanf(%d%d, r, h); v=3.1415926*r*r*h; printf(v=%f\n,v); } 第2章 习题参考答案 一.(略) 二.填空题 2.5 16 10 16、16、11 4、10、6 18、3、3 sin(65*3.14/180)+2*(3.1415926 +exp(y))/(x-y) 25、25 27 4 0 选择题 1 2 3 4 5 6 7 8 9 10 11 12 D D C B D A D B C D A B 四、编程题 1. #include stdio.h main() { int x, a, b, c; printf(Enter a intger number x=?\n); scanf(%d,x); a=x /100; b=x%100/10; c=x%10; printf(%d %d %d\n, a, b, c); } 2. #include stdio.h main() { unsigned a, b,r1,r2,r3; scanf(%u%u, a, b); r1=a b; r2=a|b; r3=a^b; printf(r1=%u,r2=%u,r3=%u\n,r1,r2,r3); getch(); } 3. #include stdio.h main() { float a, b, h, s; scanf(%f%f?%f, a, b, h); s=(a+b)*h/2; printf(s=%f\n, s); } 第3章 习题参考答案 一、判断题 1 2 3 4 5 6 × × × √ √ × 填空题 语句 表达式语句 { } 函数 由“%”和格式字符 getchar() 27 ,33 ,1b x(1)=23.14 x(2)=-78.32 5+ 6 程序阅读题 1、 p=3.14 p=3.1416 p= 3.14 p= 3.1416 p=3.14 p=3.1416 2、 a----ASCII: 97 a----ASCII: 97 a----ASCII: 97 编程题 1、 #include stdio.h main() { int a, b; float r1, r2; scanf(%d%d, a, b); r2=a+b; r1=a*b/r2; printf(r1=%0.2f,r2=%0.2f\n, r1, r2); } 2、 #include stdio.h main() { float c, f; printf(Input C=); scanf(%f, c); f=9.0/5*c+32; printf(F=%f\n, f); } 3、 #include stdio.h void main() { float c1, c2, c3, ver, s; printf(Input a, b and c:); scanf(%f%f%f, c1, c2, c3); s=c1+c2+c3; ver=s/3; printf(total s=%f , ver=%f\n, s,ver); } } 第4章 习题参考答案 判断题 1 2 3 4 5 6 × × √ √ × √ 选择题 1 2 3 4 5 6 7 8 B B B B D A B B 程序阅读题

您可能关注的文档

文档评论(0)

cduutang + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档