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

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

国家三级(网络技术)机试-试卷 76 及答案解析(总分:2.00,做题时间:90 分钟)一、程序设计题(总题数:1,分数:2.00)1. (分数:2.00)_国家三级(网络技术)机试-试卷 76 答案解析(总分:2.00,做题时间:90 分钟)一、程序设计题(总题数:1,分数:2.00)1. (分数:2.00)_正确答案:(正确答案: )解析:解析:根据题意,本程序中要统计每条记录中的有效票数,因此需要先判断该记录是否有效,然后再对有效的记录做进一步处理,即统计每个人的得票情况。 首先定义两个循环变量 i、j 和一个计数变量 cnt。 指定第一个 for 循环的循环条件,循环变量 i 从 0 开始,等于 100 时结束,每循环一次,变量 i 的值加 1。 在 for 循环中,从第一条记录开始,每执行一次循环则处理一条记录是否满足要求。for 循环语句执行流程大致如下:先将计数变量 cnt 赋值 0(每执行一次循环时,都将重新赋初值 0);然后通过一个 for 循环判断当前记录的 10 个数字是否为 1,每次判断 1 个数字,如果数字等于 1,则计数变量 cnt 的值加 1,当第二个 for 循环执行完毕后,如果计数变量 cm 的值小于等于 5,则再通过一个 for 循环重新判断哪些位置上的数等于 1,并将相应位置上的数值累加 1。

展开阅读全文
相关资源
猜你喜欢
  • UL 60079-18-2015 UL Standard for Safety Explosive atmospheres C Part 18 Equipment protection by encapsulation m (Fourth Edition Reprint with Revisions Through and Including May 25 _1.pdf UL 60079-18-2015 UL Standard for Safety Explosive atmospheres C Part 18 Equipment protection by encapsulation m (Fourth Edition Reprint with Revisions Through and Including May 25 _1.pdf
  • UL 60079-2 (ND)-2017 National Differences For UL 60079-2 Explosive Atmospheres C Part 2 Equipment Protection by Pressurized Enclosure Sixth Edition).pdf UL 60079-2 (ND)-2017 National Differences For UL 60079-2 Explosive Atmospheres C Part 2 Equipment Protection by Pressurized Enclosure Sixth Edition).pdf
  • UL 60079-2-2010 UL Standard for Safety Explosive Atmospheres - Part 2 Equipment Protection by Pressurized Enclosure “p” (Fifth Edition Reprint with revisions through and including .pdf UL 60079-2-2010 UL Standard for Safety Explosive Atmospheres - Part 2 Equipment Protection by Pressurized Enclosure “p” (Fifth Edition Reprint with revisions through and including .pdf
  • UL 60079-2-2017 UL Standard for Safety Explosive Atmospheres - Part 2 Equipment Protection by Pressurized Enclosure p (Sixth Edition).pdf UL 60079-2-2017 UL Standard for Safety Explosive Atmospheres - Part 2 Equipment Protection by Pressurized Enclosure p (Sixth Edition).pdf
  • UL 60079-25-2015 UL Standard for Safety Explosive Atmospheres - Part 25 Intrinsically Safe Electrical Systems (Second Edition).pdf UL 60079-25-2015 UL Standard for Safety Explosive Atmospheres - Part 25 Intrinsically Safe Electrical Systems (Second Edition).pdf
  • UL 60079-28 (ND)-2017 National Differences For UL 60079-28 Explosive Atmospheres C Part 28 Protection of Equipment and Transmission Systems Using Optical Radiation (Second Edition De.pdf UL 60079-28 (ND)-2017 National Differences For UL 60079-28 Explosive Atmospheres C Part 28 Protection of Equipment and Transmission Systems Using Optical Radiation (Second Edition De.pdf
  • UL 60079-28-2017 UL Standard for Safety Explosive Atmospheres C Part 28 Protection of Equipment and Transmission Systems Using Optical Radiation (Second Edition Reprint with revisi.pdf UL 60079-28-2017 UL Standard for Safety Explosive Atmospheres C Part 28 Protection of Equipment and Transmission Systems Using Optical Radiation (Second Edition Reprint with revisi.pdf
  • UL 60079-28-2017 UL Standard for Safety Explosive Atmospheres C Part 28 Protection of Equipment and Transmission Systems Using Optical Radiation (Second Edition Reprint with revisi_1.pdf UL 60079-28-2017 UL Standard for Safety Explosive Atmospheres C Part 28 Protection of Equipment and Transmission Systems Using Optical Radiation (Second Edition Reprint with revisi_1.pdf
  • UL 60079-29-4 (ND)-2018 National Differences For Explosive Atmospheres C Part 29-4 Gas Detectors C Performance Requirements of Open Path Detectors for Flammable Gases (First Editio.pdf UL 60079-29-4 (ND)-2018 National Differences For Explosive Atmospheres C Part 29-4 Gas Detectors C Performance Requirements of Open Path Detectors for Flammable Gases (First Editio.pdf
  • 相关搜索

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

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