- 1、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
c语言填空、改错,编程各一题(C language test and error correction, the programming problem)
c语言填空、改错,编程各一题(C language test and error correction, the programming problem) ━━━━━━━━━━━━━━━━ 六、程序填空共1题(共计20分) ━━━━━━━━━━━━━━━━ 第1题(20分)题号:8 / * ------------------------------------------------------- 【程序填空】 --------------------------------------------------------- 功能:以每行5个数来输出300以内能被7或17整除的偶数,并求出 其和。 ------------------------------------------------------- */ #包括 stdio. h #包括是。H main() { int,n,和; 总和= 0; *********** *********** /空间/ 【?】; *********** *********** /空间/ 为(i = 1;【?】;i++) *********** *********** /空间/ 如果(【?】) 如果(i = 2 = 0) { 求和; 氮+; printf(“% 6d”,我); *********** *********** /空间/ 如果(【?】) printf(“\n”); } printf(“\ n总= %d”,总和); } 答案: 1)。n = 0 2)。我 = 300或我<300或300 =我或300 我 3)。我% 7 = = 0 | |我% 17 = = 0或!(我7)| |!(我17)或!(我17)| |!(我7)或!(i % 7和i % 17) 4)。n % 5 = = 0或!(N 5)或N / 5 * 5 = = N ━━━━━━━━━━━━━━━━ 七、程序改错共1题(共计30分) ━━━━━━━━━━━━━━━━ 第1题(30分)题号:380 / * ------------------------------------------------------ 【程序改错】 -------------------------------------------------------- 功能:删除W所指数组中下标为K的元素中的值程序中,调用了。 getindex、arrout和arrdel三个函数,getindex用以输入 所删元素的下标,函数中对输入的下标进行检查,若越界, 则要求重新输入,直到正确为止arrout用以输出数组中。 的数据,arrdel进行所要求的删除操作。 ------------------------------------------------------ */ #包括“是的。” #包括“stdio. h” #定义数字10 ********** ********** /发现/ arrout(int,int m) { int k; ********** ********** /发现/ 对于(k = 1;k;m;k +) ********** ********** /发现/ printf(“%d”W [ K ]); printf(“\n”); } arrdel(int,int n,int k) { int i; 对于(i = k;i;n-1;i +) w [ i=w [ i + 1 ]; n; 返回N; } getindex(int n) { int I; 做 { printf(“nenter指数[ 0 =我 % ]:“,N); scanf(“%d”,与我); }(我在 0 | |我 N-1); 还我; } 主要() { int n,d,一个[数] = { 21,22,23,24,25,26,27,28,29,30 }; N =数字; clrscr(); printf(“主输出数据:\n”);arrout(a,n); a getindex(N);N = arrdel(a,n,d); printf(“输出数据后删除:\n”);arrout(a,n); } 答案: 1)。arrout(int * W,int m) 2)。 for (k = 0 and k (m; k + +) (3). printf (% d w [k]). ━━━━━━━━━━━━━━━━ 八、程序设计 共1题 (共计30分) ━━━━━━━━━━━━━━━━ 第1题 (30.0分) 题号: 534 / * ------------------------------------------------------- 【程序设计】 ----------------------
您可能关注的文档
- 90后少女未婚先孕十种典型心理(90 girls unmarried pregnancy ten typical psychology).doc
- 928常用方法(928 commonly used methods).doc
- 93分考研英语达人的阅读笔记(这个真的特别好。希望研友们可以打印下来,时常拿出来看看并比照学习(93, the English reading notes (this is really very good. Hope that friends can print down, often take a look and learn by comparison).doc
- 8句地道英语,教你赞美别人的好口才(8 sentences of idiomatic English teach you how to speak well of others).doc
- 95-培训部小蜜蜂财务软件知识必备了解(95- Training Department of bee financial software knowledge necessary to understand).doc
- 7的口决.(7 of the population.).doc
- 95-复旦大学(网络教育)(95- (Fudan University Network Education)).doc
- 93表示移动和运动的介词(93 prepositions of movement and movement).doc
- 8字神刹分析(Analysis of 8 characters).doc
- 95安徒生格林童话——谁最幸运(95 Andersen Green fairy tale - who is the luckiest).doc
- c语言填空题(C language fill in the blanks).doc
- c语言填空(C fill in the blanks).doc
- c语言学生平均分(C language students average).doc
- c语言教学视频(共32课更新完毕)(C language teaching video (a total of 32 courses updated)).doc
- c语言推理(C language reasoning).doc
- c语言概述1(C language 1).doc
- c语言的演变史(The evolution of C language).doc
- c语言第八章字符串编程答案(C language eighth chapter string programming answers).doc
- c语言笔试试题(C language written questions).doc
- c语言词法分析器_c语言版_源代码(C language lexical analyzer _c language version _ source code).doc
文档评论(0)