- 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上机填空(数组)(Fill in the blanks on the two level C (array))
二级c上机填空(数组)(Fill in the blanks on the two level C (array))
PX = Pn =我;
********** ********** /发现/
为(j = i + 1;J<n;j++)
{如果(最大 [ J ])
{最大值=一个[J];PX = j;}
如果(min 一[ J ])
{ min =一个[J];Pn = j;}
}
如果(PX!=我)
{ T =一个[我];一个[我] =最大;一个[ PX ] = T;
如果(Pn = =我)Pn = PX;
}
如果(PN!= I + 1)
{ T =一个[我+ 1 ];一个[我] + 1 =民;一个[伪] = T;}
}
}
main()
{ int b [ ] = { 1,4,2,3,9,6,5,8,7 },我;
printf(“\ n原始数据:\n”);
为(i = 0;i n;i++)printf(“4D”,B [我]);
printf(“\n”);
有趣的(B,N);
printf(“\ n数据后动:\n”);
为(i = 0;i n;i++)printf(“4D”,B [我]);
printf(“\n”);
}
52。下列给定程序中,函数乐趣的功能是:把形参一所指数组中的偶数按原顺序依次存放到一[ 0 ]、一[ 1 ]、一[ 2 ]、......中,把奇数从数组中删除,偶数的个数通过函数值返回。
例如,若一所指数组中的数据最初排列列为:9 1 4 2、、、、3、6、5、8、7,删除奇数后一所指数组中的数据为:4 2 6 8、、、,返回值为4。
#包括 stdio. h
#定义N 9
国际娱乐(int [],int n)
{ int i,j;
J = 0;
为(i = 0;i n;i++)
********** ********** /发现/
如果(一个[我] % 2 = = 0){
********** ********** /发现/
一个[ J ] =一个[我];J + +;
}
********** ********** /发现/
回归[J].;
}
main()
{ int b [ ] = { 9,1,4,2,3,6,5,8,7 },i,n;
printf(“\ n原始数据:\n”);
为(i = 0;i n;i++)printf(“4D”,B [我]);
printf(“\n”);
N =乐趣(B,N);
printf(“\ n多连:%d\n”,n);
printf(“\ n连:\n”);
为(i = 0;i n;i++)printf(“4D”,B [我]);
printf(“\n”);
}
58。从键盘输入一组无符号整数并保存在数组XX [N]中,以整数0结束输入,要求这些数的最大位数不超过4位,其元素的个数通过变量Num传入函数乐趣。请补充函数乐趣,该函数的功能是:从数组XX中找出个位和十位的数字之和大于5的所有无符号整数,结果保存在数组YY中,其个数由函数乐趣返回。
例如,当XX [ 8 ]={ 123,11,25222,42333,145451 }时,BB [ 4 ]={ 25,423335451 }。
#包括 stdio. h
#定义N 1000
国际娱乐(int xx [ ] [ ] BB,int,int num)
{
int i,n = 0;
int G,S;
为(i = 0;i 民;i++)
{
G = XX [我] % 10;
S = XX [我] / 10% 10;
如果((G+) 5)
BB [ n + +] = XX [我];
}
返回N;
}
无效main()
{
int xx的[ ];
在YY的[ ];
int num = 0,n = 0,I = 0;
printf(“输入号码:\n”);
做
{
scanf(“%”,与XX [民]);
}
而(XX [数+ +]!= 0);
N =乐趣(XX,YY,NUM);
printf(“NYY =”);
为(i = 0;i n;i++)
printf(“%”,YY [我]);
}
76。给定程序的功能是:将N个人员的考试成绩进行分段统计,考试成绩存到数组一中,各分段的人数存到数组B中:成绩为60到69的人数存到B [ 0 ]中,
您可能关注的文档
- ~101~导播文本(~101~ director of text).doc
- §37 管理控制的基本原则(The 37 basic principles of management control).doc
- §40 组织文化的类型(40 types of organizational culture).doc
- §x2.1 导体中的电场和电流 电动势(Electric potential, electric field and current in the conductor x2.1).doc
- [经验论文]浅谈思品课导学式教学——刘淑杰教师成长记录([experience] discussion on guided teaching of thought quality course -- Record of teacher's growth of Liu Shujie).doc
- · 如何写高中材料作文(How to write high school material composition).doc
- β-受体阻滞剂在高血压治疗再认识(Recognition of beta blocker in the treatment of hypertension).doc
- √考试版《简论关联企业》(Have the test version of the affiliated enterprise Jane).doc
- ╄→ 女生一定要知道——三句话搞定发型师!(, girls must know three words fix hair stylist!).doc
- ◆◇绝情疯丶小孩(The crazy child, you unfeeling).doc
- 二力平衡练习题_百度文库(Two force balance exercises _ Baidu Library).doc
- 二级c上机填空(矩阵)(Two level C fill in the blanks (matrix)).doc
- 二级vf选择填空及答案(Level two, VF, fill in the blanks and answer).doc
- 二级vb考试程序阅读题分析与解题技巧(Two level VB examination procedure, reading question analysis and solving skill).doc
- 五四不是历史的回声(54 is not the echo of history).doc
- 五步教学法——谈如何上好高三地理复习课——论文(Five step teaching method -- on how to make a good geography review course in Senior Middle School).doc
- 人本主义文化为烟草制造注入新价值(Humanism culture into the new value for tobacco manufacturing).doc
- 中华老字号申报相关资料填报说明)(Explanation of relevant information on declaration of China Time-honored Brand).doc
- 从765465减到765249 然后显示hello 通过c语音来编译程序(From 765465 to 765249, and then show that hello compiles the program through c voice).doc
- 从仿古玉器看中华民族各时期的玉器观(Viewing the view of jade in different periods of Chinese nation from the ancient jade carving).doc
文档评论(0)