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

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

国家三级(网络技术)机试-试卷 102 及答案解析(总分:2.00,做题时间:90 分钟)一、程序设计题(总题数:1,分数:2.00)1. (分数:2.00)_国家三级(网络技术)机试-试卷 102 答案解析(总分:2.00,做题时间:90 分钟)一、程序设计题(总题数:1,分数:2.00)1. (分数:2.00)_正确答案:(正确答案: )解析:解析:首先定义一个循环变量循环 i 和用于正负号转换的变量j,同时赋 j 的初值为-1。 通过 for 循环对 800 到 500 的每个数字进行逐个的扫描,指定循环变量 i 的初值为 800,当 i 值等于 500 停止循环,每执行一次循环,i 的值便减 1。(注意,本题 for 循环从大到小依次读取数据是根据题目要求设计的,这样得到的素数值其排序方式就是从大到小排序。) 在每次执行 for 循环时,都调用素数判断函数 isPrime()判断当前的 i 值是否为素数,如果是素数,则素数计数变量 cnt 值加 1,正负号转换变量 j的值乘以-1,实现正负数的交替转换,最后将每次循环得到的 i*j 的值累加到求和变量 sum 中。

展开阅读全文
相关资源
猜你喜欢
  • DIN EN 4134-2009 de en 4436 Aerospace series - Bolts normal hexagonal head coarse tolerance normal shank long thread in heat resisting nickel base alloy aluminium IVD coated - Clas.pdf DIN EN 4134-2009 de en 4436 Aerospace series - Bolts normal hexagonal head coarse tolerance normal shank long thread in heat resisting nickel base alloy aluminium IVD coated - Clas.pdf
  • DIN EN 4135-2009 de en 6109 Aerospace series - Bolts normal bi-hexagonal head coarse tolerance normal shank medium length thread in titanium alloy anodized MoS lubricated - Classif.pdf DIN EN 4135-2009 de en 6109 Aerospace series - Bolts normal bi-hexagonal head coarse tolerance normal shank medium length thread in titanium alloy anodized MoS lubricated - Classif.pdf
  • DIN EN 4136-2011 Aerospace series - Bolts normal bi-hexagonal head coarse tolerance normal shank long thread in alloy steel cadmium plated - Classification 1100 MPa (at ambient tem.pdf DIN EN 4136-2011 Aerospace series - Bolts normal bi-hexagonal head coarse tolerance normal shank long thread in alloy steel cadmium plated - Classification 1100 MPa (at ambient tem.pdf
  • DIN EN 4137-2009 Aerospace series - Bolts normal bi-hexagonal head stepped shank long thread in titanium alloy anodized MoS lubricated - Classification 1100 MPa (at ambient tempera.pdf DIN EN 4137-2009 Aerospace series - Bolts normal bi-hexagonal head stepped shank long thread in titanium alloy anodized MoS lubricated - Classification 1100 MPa (at ambient tempera.pdf
  • DIN EN 4138-2016 Aerospace series - Screws pan head offset cruciform recess coarse tolerance normal shank medium length thread in alloy steel cadmium plated - Classification 1 100 .pdf DIN EN 4138-2016 Aerospace series - Screws pan head offset cruciform recess coarse tolerance normal shank medium length thread in alloy steel cadmium plated - Classification 1 100 .pdf
  • DIN EN 415-1-2014 Safety of packaging machines - Part 1 Terminology and classification of packing machines and associated equipment German version EN 415-1 2014《打包机的安全 第1部分 打包机及相关设.pdf DIN EN 415-1-2014 Safety of packaging machines - Part 1 Terminology and classification of packing machines and associated equipment German version EN 415-1 2014《打包机的安全 第1部分 打包机及相关设.pdf
  • DIN EN 415-10-2014 Safety of packaging machines - Part 10 General requirements German version EN 415-10 2014《包装机械的安全性 第10部分 通用要求 德文版本EN 415-10-2014》.pdf DIN EN 415-10-2014 Safety of packaging machines - Part 10 General requirements German version EN 415-10 2014《包装机械的安全性 第10部分 通用要求 德文版本EN 415-10-2014》.pdf
  • DIN EN 415-2-2000 Safety of packaging machines - Part 2 Pre-formed rigid container packaging machines German version EN 415-2 1999《包装机械的安全性 第2部分 预成形刚性容器包装机》.pdf DIN EN 415-2-2000 Safety of packaging machines - Part 2 Pre-formed rigid container packaging machines German version EN 415-2 1999《包装机械的安全性 第2部分 预成形刚性容器包装机》.pdf
  • DIN EN 415-3-2010 Safety of packaging machines - Part 3 Form fill and seal machines German version EN 415-3 1999+A1 2009《包装机械安全性 第3部分 成型 填充和密封机械 德文版本EN 415-3 1999+A1 2009》.pdf DIN EN 415-3-2010 Safety of packaging machines - Part 3 Form fill and seal machines German version EN 415-3 1999+A1 2009《包装机械安全性 第3部分 成型 填充和密封机械 德文版本EN 415-3 1999+A1 2009》.pdf
  • 相关搜索

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

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