【计算机类职业资格】国家三级(网络技术)机试-试卷11及答案解析.doc

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

1、国家三级(网络技术)机试-试卷 11 及答案解析(总分:2.00,做题时间:90 分钟)一、程序设计题(总题数:1,分数:2.00)1. (分数:2.00)_国家三级(网络技术)机试-试卷 11 答案解析(总分:2.00,做题时间:90 分钟)一、程序设计题(总题数:1,分数:2.00)1. (分数:2.00)_正确答案:(正确答案: )解析:解析:根据题意,本程序涉及 10 个候选人共 100 条记录,其中,100 条记录的选票文件采用二维数组存储其数据,第一维表示 100 条记录,第二维表示每条记录中 10 个候选人的选中情况。可以通过两个 for 循环对 100 条记录逐个比对,在第一层

2、 for 循环中,对 100 条记录的每条记录情况进行扫描,在第二层 for 循环语句中,判断数组元素 xxij的值是否等于字符 1,如果等于字符 1,说明第 j 个人得了一票,则数组元素 yyj加 1。 先定义两个循环变量 i 和 j。 指定第一个 for 循环的循环条件,循环变量 i 从 0 开始,等于 100 时结束,每循环一次,变量 i 的值加 1。 在 for 循环中首先判断记录值不等于 1111111111 的记录,然后计算 10 个候选人的得票数,可以通过一个 for 循环,对满足条件的记录中的每个数字再次比对,当数字等于 1 时,将第 i 个人的票数加 1。 注意,本程序中由于只有数值 1 才会被计算到最后的结果中,因此,可以省去判断记录全为 0 时记录无效的情况,因为,即使将 0 参与到计算中,其计算结果也还是 0,不会影响到最终结果,只需判断记录为全 1 时无效即可。

展开阅读全文
相关资源
猜你喜欢
  • BS DD CEN TS 15524-2006 Postal services — Customer-directed information including track and trace — General concepts and definitions《邮政服务 包括跟踪和查询的客户导向信息 一般概念和定义》.pdf BS DD CEN TS 15524-2006 Postal services — Customer-directed information including track and trace — General concepts and definitions《邮政服务 包括跟踪和查询的客户导向信息 一般概念和定义》.pdf
  • BS DD CEN TS 15525-2006 Postal services — Standard Interfaces — Interface between Machine Control and Bar Code Printers《邮政服务 标准接口 机械控制和条码打印机间的接口》.pdf BS DD CEN TS 15525-2006 Postal services — Standard Interfaces — Interface between Machine Control and Bar Code Printers《邮政服务 标准接口 机械控制和条码打印机间的接口》.pdf
  • BS DD CEN TS 15531-4-2011 Public transport Service interface for real-time information relating to public transport operations Functional service interfaces Facility monitoring《公共运.pdf BS DD CEN TS 15531-4-2011 Public transport Service interface for real-time information relating to public transport operations Functional service interfaces Facility monitoring《公共运.pdf
  • BS DD CEN TS 15534-2-2007 Wood-plastics composites (WPC) - Characterisation of WPC materials《木塑复合材料(WPS) 木塑复合材料特征》.pdf BS DD CEN TS 15534-2-2007 Wood-plastics composites (WPC) - Characterisation of WPC materials《木塑复合材料(WPS) 木塑复合材料特征》.pdf
  • BS DD CEN TS 15568-2006 Foodstuffs — Methods of analysis for the detection of genetically nmodified organisms and derived products — Sampling strategies《食品 检测转基因生物体和衍生产品的分析方法 取样策略》.pdf BS DD CEN TS 15568-2006 Foodstuffs — Methods of analysis for the detection of genetically nmodified organisms and derived products — Sampling strategies《食品 检测转基因生物体和衍生产品的分析方法 取样策略》.pdf
  • BS DD CEN TS 15597-2-2012 Winter maintenance equipment Spreading machines (gritting machines) Requirements for distribution and its test《冬季维护设备 涂胶机(铺砂机) 涂胶机的配置及其试验》.pdf BS DD CEN TS 15597-2-2012 Winter maintenance equipment Spreading machines (gritting machines) Requirements for distribution and its test《冬季维护设备 涂胶机(铺砂机) 涂胶机的配置及其试验》.pdf
  • BS DD CEN TS 15606-2009 Foodstuffs - Determination of acesulfame-K aspartame neohesperidine-dihydrochalcone and saccharin - High performance liquid chromatographic method《食品 乙酰舒泛钾、.pdf BS DD CEN TS 15606-2009 Foodstuffs - Determination of acesulfame-K aspartame neohesperidine-dihydrochalcone and saccharin - High performance liquid chromatographic method《食品 乙酰舒泛钾、.pdf
  • BS DD CEN TS 15639-2010 Solid recovered fuels Determination of mechanical durability of pellets《固体再生燃料 颗粒机械耐久性的测定》.pdf BS DD CEN TS 15639-2010 Solid recovered fuels Determination of mechanical durability of pellets《固体再生燃料 颗粒机械耐久性的测定》.pdf
  • BS DD CEN TS 15658-2007 Advanced technical ceramics - Mechanical properties of ceramic fibres at high temperature under non-reactive environment - Determination of creep behaviour .pdf BS DD CEN TS 15658-2007 Advanced technical ceramics - Mechanical properties of ceramic fibres at high temperature under non-reactive environment - Determination of creep behaviour .pdf
  • 相关搜索

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

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