【计算机类职业资格】三级网络技术机试-242及答案解析.doc

上传人:syndromehi216 文档编号:1321944 上传时间:2019-10-17 格式:DOC 页数:2 大小:26.50KB
下载 相关 举报
【计算机类职业资格】三级网络技术机试-242及答案解析.doc_第1页
第1页 / 共2页
【计算机类职业资格】三级网络技术机试-242及答案解析.doc_第2页
第2页 / 共2页
亲,该文档总共2页,全部预览完了,如果喜欢就下载吧!
资源描述

1、三级网络技术机试-242 及答案解析(总分:100.00,做题时间:90 分钟)一、上机题(总题数:1,分数:100.00)1.补充函数,要求实现如下功能:寻找并输出 11999 之间的数 m,使得 m、m 2、m 3均为回文数(回文数是指各位数字左右对称的整数),例如:12321、505、1458541 等。满足上述条件的数如 m=11 时,m2=121,m 3=1331 都是回文数。请编写 jsValue(long m)实现此功能。如果是回文数,则函数返回 1,不是则返回 0。最后,把结果输出到文件 OUT.DAT 中。注意:部分源程序已经给出。请勿改动主函数 main()中的内容。试题程

2、序:#includestring.h#includestdio.h#includestdlib.hint jsValuelong nmain()long m;FILE*out;out=fopen(“OUT.DAT“,“w“);for(m=11;m1000;m+)if(jsValue(m)jsValue(m*m)jsValue(m*m*m)printf(“m=%4ld,m*m=%6ld,m*m*m=%8ld/n“,m,m*m,m*m*m);fprintf(out,“m=%4ld,m*m=%6ld,m*m*m=%8ld/n“,m,m*m,m*m*m);fclose(out);(分数:100.00)

3、三级网络技术机试-242 答案解析(总分:100.00,做题时间:90 分钟)一、上机题(总题数:1,分数:100.00)1.补充函数,要求实现如下功能:寻找并输出 11999 之间的数 m,使得 m、m 2、m 3均为回文数(回文数是指各位数字左右对称的整数),例如:12321、505、1458541 等。满足上述条件的数如 m=11 时,m2=121,m 3=1331 都是回文数。请编写 jsValue(long m)实现此功能。如果是回文数,则函数返回 1,不是则返回 0。最后,把结果输出到文件 OUT.DAT 中。注意:部分源程序已经给出。请勿改动主函数 main()中的内容。试题程

4、序:#includestring.h#includestdio.h#includestdlib.hint jsValuelong nmain()long m;FILE*out;out=fopen(“OUT.DAT“,“w“);for(m=11;m1000;m+)if(jsValue(m)jsValue(m*m)jsValue(m*m*m)printf(“m=%4ld,m*m=%6ld,m*m*m=%8ld/n“,m,m*m,m*m*m);fprintf(out,“m=%4ld,m*m=%6ld,m*m*m=%8ld/n“,m,m*m,m*m*m);fclose(out);(分数:100.00)

5、正确答案:(int i,j;PRO xy;for(i=0;i99;i+)for(j=i+1;j100;j+)if(strcmp(selli.me,sellj.mc)0如果产品 i 的产品名称小于产品 j 的产品名称strcmp(selli.mc,sellj.mc)=0如果产品 i 的产品名称等于产品 j 的产品名称selli.jesellj.je)如果产品 i 的金额大于产品 j 的金额xy=selli;selli=sellj;sellj=xy;产品 i 和产品 j 交换解析 本题主要考查数组的排序操作。算法思路:i 结点与后面的所有 j 结点比较,若符合条件则交换 i、j 结点位置。然后后移 i 结点,执行步骤直到 i 结点是倒数第 2 个结点为止。)解析:

展开阅读全文
相关资源
猜你喜欢
  • DIN EN ISO 22612-2005 Clothing for protection against infectious agents - Test method for resistance to dry microbial penetration (ISO 22612 2005) German version EN ISO 22612 2005《.pdf DIN EN ISO 22612-2005 Clothing for protection against infectious agents - Test method for resistance to dry microbial penetration (ISO 22612 2005) German version EN ISO 22612 2005《.pdf
  • DIN EN ISO 22630-2016 Oilseed meals - Determination of oil content - Rapid extraction method (ISO 22630 2015) German version EN ISO 22630 2015《含油种子 油含量的测定 快速萃取法(ISO 22630-2015) 德文版.pdf DIN EN ISO 22630-2016 Oilseed meals - Determination of oil content - Rapid extraction method (ISO 22630 2015) German version EN ISO 22630 2015《含油种子 油含量的测定 快速萃取法(ISO 22630-2015) 德文版.pdf
  • DIN EN ISO 22649-2016 Footwear - Test methods for insoles and insocks - Water absorption and desorption (ISO 22649 2016) German version EN ISO 22649 2016《鞋靴 内垫和内底的试验方法 吸水率和减湿率(ISO .pdf DIN EN ISO 22649-2016 Footwear - Test methods for insoles and insocks - Water absorption and desorption (ISO 22649 2016) German version EN ISO 22649 2016《鞋靴 内垫和内底的试验方法 吸水率和减湿率(ISO .pdf
  • DIN EN ISO 22665-2013 Ophthalmic optics and instruments - Instruments to measure axial distances in the eye (ISO 22665 2012) German version EN ISO 22665 2012《眼科光学和仪器 眼镜轴向距离的测量仪器(IS.pdf DIN EN ISO 22665-2013 Ophthalmic optics and instruments - Instruments to measure axial distances in the eye (ISO 22665 2012) German version EN ISO 22665 2012《眼科光学和仪器 眼镜轴向距离的测量仪器(IS.pdf
  • DIN EN ISO 22674-2016 Dentistry - Metallic materials for fixed and removable restorations and appliances (ISO 22674 2016) German version EN ISO 22674 2016《牙科 固定和可移动复位的金属材料和器具(ISO 2.pdf DIN EN ISO 22674-2016 Dentistry - Metallic materials for fixed and removable restorations and appliances (ISO 22674 2016) German version EN ISO 22674 2016《牙科 固定和可移动复位的金属材料和器具(ISO 2.pdf
  • DIN EN ISO 22675-2016 Prosthetics - Testing of ankle-foot devices and foot units - Requirements and test methods (ISO 22675 2016) German version EN ISO 22675 2016《假肢 脚踝装置和脚部件试验 要求和.pdf DIN EN ISO 22675-2016 Prosthetics - Testing of ankle-foot devices and foot units - Requirements and test methods (ISO 22675 2016) German version EN ISO 22675 2016《假肢 脚踝装置和脚部件试验 要求和.pdf
  • DIN EN ISO 22716-2008 Cosmetics - Good Manufacturing Practices (GMP) - Guidelines on Good Manufacturing Practices (ISO 22716 2007) German version EN ISO 22716 2007《化妆品 优良的生产实践(GMP).pdf DIN EN ISO 22716-2008 Cosmetics - Good Manufacturing Practices (GMP) - Guidelines on Good Manufacturing Practices (ISO 22716 2007) German version EN ISO 22716 2007《化妆品 优良的生产实践(GMP).pdf
  • DIN EN ISO 22717-2016 Cosmetics - Microbiology - Detection of Pseudomonas aeruginosa (ISO 22717 2015) German version EN ISO 22717 2015《微生物 化妆品 铜绿假单胞菌的检测(ISO 22717-2015) 德文版本EN ISO .pdf DIN EN ISO 22717-2016 Cosmetics - Microbiology - Detection of Pseudomonas aeruginosa (ISO 22717 2015) German version EN ISO 22717 2015《微生物 化妆品 铜绿假单胞菌的检测(ISO 22717-2015) 德文版本EN ISO .pdf
  • DIN EN ISO 22718-2016 Cosmetics - Microbiology - Detection of Staphylococcus aureus (ISO 22718 2015) German version EN ISO 22718 2015《化妆品 微生物学 金黄色葡萄球菌的测定(ISO 22718-2015) 德文版本EN ISO.pdf DIN EN ISO 22718-2016 Cosmetics - Microbiology - Detection of Staphylococcus aureus (ISO 22718 2015) German version EN ISO 22718 2015《化妆品 微生物学 金黄色葡萄球菌的测定(ISO 22718-2015) 德文版本EN ISO.pdf
  • 相关搜索

    当前位置:首页 > 考试资料 > 职业资格

    copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
    备案/许可证编号:苏ICP备17064731号-1