c语言-课后题答案(C language - after-school questions answer).docVIP

c语言-课后题答案(C language - after-school questions answer).doc

  1. 1、本文档共50页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
  5. 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
  6. 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们
  7. 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
  8. 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
c语言-课后题答案(C language - after-school questions answer)

c语言-课后题答案(C language - after-school questions answer) C language after-school exercise answer: The first chapter Please refer to the example of chapter 1., write a C program to output the following information: ************************** Very good! ************************** Solution: #includestdio.h Void (main) { Printf (**************************); Printf (\n); Printf (Very good \n!); Printf (\n); Printf (**************************); } 2. write a C program, a, B, C input three output value, the maximum value. Solution: #includestdio.h Void (main) { Int a, B, C, max; Printf (please input three numbers a, B, c:\n); Scanf (%d,%d,%d, a, b, c); Max=a; If (maxb) max=b; If (maxc) max=c; Printf (maximum number:%d, Max); } The second chapter If 1. of our GDP annual growth rate was 10%, 10 years after the calculation of our GDP growth percentage compared to now. The calculation formula for P= (1+r) ^n, R annual growth rate; n years; P as percentage and compared to now. Solution: #includestdio.h #includemath.h Void (main) { Double P, r=0.1, n=10; (P=pow (1+r), n); Printf (%lf\n, P); } 3. please program will be translated into China password decoding rule is used in the original letters behind the fourth letters instead of the original letter. For example, the letter A behind the fourth letter is E, E instead of A. Therefore, China should be translated as Glmre. Please write a program, with the method of the initial value of Cl, C2, C3, C4, C5 values of five variables wereC,H,i,n,a, C1, C2 after operation, C3, C4, C5,l andGrespectively intom,r,e, and output. Solution: #include stdio.h Void (main) { Char c1=C, c2=h, c3=i, c4=n, c5=a; C1+=4; C2+=4; C3+=4; C4+=4; C5+=4; Printf (password is%c%c%c%c%c\n, C1, C2, C3, C4, C5); } The third chapter 3. using the scanf function of the input data, the following a=3, b=7, x=8.5, y=71.82, c1=A, c2=a. Ask how to enter on the keyboard? Solution: #includestdio.h Void (main) { Int a, float x, B; Y; char C1, c2; Scanf (a=%d, b=%d, a, b); Scanf

您可能关注的文档

文档评论(0)

f8r9t5c + 关注
实名认证
文档贡献者

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

版权声明书
用户编号:8000054077000003

1亿VIP精品文档

相关文档