1 / 18
文档名称:

2.数位分解后按数筛选统计并排序.doc

格式:doc   大小:56KB   页数:18
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

2.数位分解后按数筛选统计并排序.doc

上传人:sssmppp 2022/6/13 文件大小:56 KB

下载得到文件列表

2.数位分解后按数筛选统计并排序.doc

相关文档

文档介绍

文档介绍:
The 11. known IN. DAT data file has 300 to four digits, and has read function called ReadDat () the nus on the number the CNT, then all the time to meet the conditions of the 4 digits from one into the array of B, and then the 4 digit B array according to the order from large to small order, the last call writeDat () function to write the output to the file .
/ * solution:
Void, jsvalue ()
{
Int, I, j:
Intal, A2, A3, a4;
Int temp:
For (i=0; i<300; i++)
(a4=a[i]/1000;
A3=a[i]%1000/100;
A2=a[i]%100/10;
Al=a[i]%10;
If (a4+a3==a2+al)
(b[cnt]=a[i] : cnt++;})
For (i=0: i<cnt-l: i++)
For (j=i+l: j<cnt; j++)
If (b[i]<b[j])
(temp=b[i]:
B[i]=b[j];
B[j]=temp;
}
}
14 known data files INI. DAT and IN2. DAT, respectively, there are 100 binary decimal number, and has called read correspondence ReadDat (), the two documents in the number of
savings into the array A and b,
Please write a function jsValue (), the realization of the function is in turn to an array of a and B in the number according to the conditions of re form a new number and then stored in the array C, the array number of C according to the order from small to large, the final call to the write function (writeDat) to the C output to OUT. DAT file.
The number of new conditions: if the array of a and B in the same subscript position number must be consistent with the one is even, another is odd, then in the a array according to the number of binary left shift eight plus B array on the corresponding position of the number, the new number of this component are stored in an array C.
Void, jsval ()
{int, I, j:
Int temp:
For (i=0: i<=MAX-l: i++)
If (((a[i]%2==0) && (b[i]%2! =0) (| |) (a[i]%2! =0) && (b[i]%2==0)))
(c[i]= (a[i]«8) +b[i];
Cnt++;}
For (i=0; i<MAX-l; i++)
For (j=0: j〈max-iT; j++)
If (c[j]>c[j+l])
(temp=c[j] : c[j]=c[j+l] : c[j+l]=temp;})
The 15 known IN. DAT data file has 300 to four digits, and has read function called ReadDat () the number stored i

最近更新

2025年黑龙江商业职业学院单招职业适应性测试.. 45页

2025枣庄技师学院公开招聘第二批备案制工作人.. 48页

2025泰科防务科技(重庆)有限公司招聘2人备考.. 45页

2025福建厦门市杏南中学产假顶岗教师招聘1人参.. 51页

2025重庆巫溪县公开遴选机关事业单位24人备考.. 47页

2026上海银清企业服务有限公司招聘备考题库附.. 44页

2026四川阿坝州阿坝县国有资产管理中心招聘阿.. 49页

2026年c语言指针考试题库及1套完整答案 13页

2026年c语言期末试题及答案(全国通用) 13页

2026年c语言知识试题(考试直接用) 13页

2026年中国城市建设史复习题100道含答案(研优.. 44页

2024年安庆医药高等专科学校辅导员招聘考试真.. 30页

2026年云南水利水电职业学院单招职业技能测试.. 45页

2024年新疆医科大学辅导员招聘备考题库最新 36页

2026年企业作业人员题库100道带答案(培优) 40页

2024年福州墨尔本理工职业学院辅导员招聘备考.. 30页

2025下半年山东高速云南发展有限公司招聘1人考.. 50页

2025云南曲靖市马龙区旧县街道社区卫生服务中.. 32页

2026年医学微生物学习题集及答案(名校卷) 41页

2026年南宁职业技术学院单招职业倾向性测试题.. 44页

2026年危化品安全生产知识题库及答案(夺冠系.. 41页

2025年内蒙古机电职业技术学院马克思主义基本.. 12页

2025交通运输部所属事业单位第七批统一招聘10.. 18页

2025年新疆考试录用公务员《公安专业科目》真.. 30页

沪科版八年级-《压强》单元测试题(含答案) 7页

企业承包商准入与退出机制 11页

中药配伍禁忌表 6页

《凌志轩四柱命理高级培训班教材》 72页

隐仙派子平命法传人班,老海秘本面授资料 22页

心思的战场-乔依丝迈尔 50页