- 1、本文档共16页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
4.数位分解并重组后再筛选并排序(4. digitally decompose and recombine before screening and sorting)
4.数位分解并重组后再筛选并排序(4. digitally decompose and recombine before screening and sorting)
The 27. known IN.DAT data file has 200 to four digits, and has read function called readDat () the number stored in the array a, please prepare the function jsval (), its function is: the thousand digit and ten digit to form a new containing two digit (ten digit number AB the new number is four digit thousand digit, the number of new digits is four digits ten digits), as well as the digits and 100 digits another containing two digit number CD (ten digit number of new is the original four digit bit the book numbers, digits is four digits per digit), if the newly formed two numbers ab-cd=0 and ab-cd=10 and the two digits are odd, while ten digit two new number is not zero, it will meet this condition according to the four digit sequence from big to small deposit the array of B, and The number of calculation to meet the above conditions of four digit cnt. Finally, the main () function call write function writeDat () the results of CNT and B in array to meet the conditions of the four digit output to OUT.DAT file.
/ * solution:
Void (jsVal)
{int i, j;
Int A1, A2, A3, a4;
Int temp
Int AB, CD
For (i=0; i200; i++)
{a4=a[i]/1000;
A3=a[i]%1000/100;
A2=a[i]%100/10;
A1=a[i]%10;
Ab=10*a4+a2;
Cd=10*a1+a3;
If ((ab-cd) =0 (ab-cd) =10ab%2==1cd%2==1a4 =0a1 =0!!)
{b[cnt]=a[i]}; cnt++;
}
For (i=0; icnt-1; i++)
For (j=i+1; jcnt; j++)
If (b[i]b[j]);
Temp=b[i]; b[i]=b[j]; b[j]=temp;
}
}*/
The 28. known IN.DAT data file has 200 to four digits, and has read function called readDat () the number stored in the array a, please prepare the function jsval (), its function is: the thousands of digits and digits to form a new containing two digit number (ten digits of the new the number is four digit thousand digit, the number of new digits is a digit original four digits), and the hundred digit and ten digit composition containing another new two digit number (ten digit number of new is the original four digit hu
您可能关注的文档
- 2012高中语文作文万能开头,结尾(2012, high school Chinese writing universal beginning, ending).doc
- 2012版最新网络分析仪测天线s参数应用实例(2012 edition of the latest network analyzer antenna s parameter application examples).doc
- 2012高考备战数学九大模块易错易混考点78条(2012 preparing for the entrance of nine modules Mathematics easily mixed point 78).doc
- 2013东南复试细则(2013 southeast retrial rules).doc
- 20131011乌兰浩特市科三白考过程详解(20131011, Ulanhot city section three white test process detailed).doc
- 2013台北乐器大展-同业交流媒合会(2013 Taipei Instrument Exhibition - interbank exchange will match).doc
- 2013信息技术加试(2013 information technology test).doc
- 2013天下三花灯谜底(2013 world three lantern riddle).doc
- 2013季建筑计算机答题(Construction computer answers in the 2013 quarter).doc
- 2012研修作业辩论赛——生活中的新词语(2012 training Debate Contest - new words in life).doc
文档评论(0)