[计算机类试卷]国家三级(网络技术)机试模拟试卷159及答案与解析.doc

上传人:bowdiet140 文档编号:495665 上传时间:2018-11-28 格式:DOC 页数:4 大小:145.50KB
下载 相关 举报
[计算机类试卷]国家三级(网络技术)机试模拟试卷159及答案与解析.doc_第1页
第1页 / 共4页
[计算机类试卷]国家三级(网络技术)机试模拟试卷159及答案与解析.doc_第2页
第2页 / 共4页
[计算机类试卷]国家三级(网络技术)机试模拟试卷159及答案与解析.doc_第3页
第3页 / 共4页
[计算机类试卷]国家三级(网络技术)机试模拟试卷159及答案与解析.doc_第4页
第4页 / 共4页
亲,该文档总共4页,全部预览完了,如果喜欢就下载吧!
资源描述

国家三级(网络技术)机试模拟试卷 159及答案与解析 一、程序设计题 1 国家三级(网络技术)机试模拟试卷 159答案与解析 一、程序设计题 1 【正确答案】 【试题解析】 首先定义循环变量 i,然后通过 for循环对数组 a300中的每个元素 ai调用函数 isP(ai)判断 ai是否是素数 (素数的算法已在 isP()函数中给出,此处直接调用即可 ),如果 是素数,则把其加到变量 pjz1上,同时计数变量 cnt加 1,否则 ai值加到变量pjz2上。直到判断完数组 a300中的所有数据后退出循环。 求出 pjz1、 pjz2和 cnt的值之后,再用变量 pjz1的值除以 cnt的值就得到素数的平均值,同时把这个值赋给变量 pjz1,最后用变量 pjz2的值除以 300-cnt的值就得到非素数的平均值,并把这个值赋给变量 pjz2。

展开阅读全文
相关资源
猜你喜欢
  • ASTM A1079-2013e2 Standard Specification for Steel Sheet Complex Phase (CP) Dual Phase (DP) and Transformation Induced Plasticity (TRIP) Zinc-Coated (Galvanized) or Zinc-Iron Alloy.pdf ASTM A1079-2013e2 Standard Specification for Steel Sheet Complex Phase (CP) Dual Phase (DP) and Transformation Induced Plasticity (TRIP) Zinc-Coated (Galvanized) or Zinc-Iron Alloy.pdf
  • ASTM A1079-2017 Standard Specification for Steel Sheet Complex Phase (CP) Dual Phase (DP) and Transformation Induced Plasticity (TRIP) Zinc-Coated (Galvanized) or Zinc-Iron Alloy-C.pdf ASTM A1079-2017 Standard Specification for Steel Sheet Complex Phase (CP) Dual Phase (DP) and Transformation Induced Plasticity (TRIP) Zinc-Coated (Galvanized) or Zinc-Iron Alloy-C.pdf
  • ASTM A108-2007 Standard Specification for Steel Bar Carbon and Alloy Cold-Finished《冷加工碳素钢和合金钢棒材的标准规范》.pdf ASTM A108-2007 Standard Specification for Steel Bar Carbon and Alloy Cold-Finished《冷加工碳素钢和合金钢棒材的标准规范》.pdf
  • ASTM A108-2013 Standard Specification for Steel Bar Carbon and Alloy Cold-Finished《冷加工碳素钢和合金钢棒材的标准规格》.pdf ASTM A108-2013 Standard Specification for Steel Bar Carbon and Alloy Cold-Finished《冷加工碳素钢和合金钢棒材的标准规格》.pdf
  • ASTM A1080-2012 Standard Practice for Hot Isostatic Pressing of Steel Stainless Steel and Related Alloy Castings《钢 不锈钢和相关合金铸件的高温等静力压制的标准实施规程 n》.pdf ASTM A1080-2012 Standard Practice for Hot Isostatic Pressing of Steel Stainless Steel and Related Alloy Castings《钢 不锈钢和相关合金铸件的高温等静力压制的标准实施规程 n》.pdf
  • ASTM A1080-2014 Standard Practice for Hot Isostatic Pressing of Steel Stainless Steel and Related Alloy Castings《钢 不锈钢和相关合金铸件的高温等静力压制的标准实施规程》.pdf ASTM A1080-2014 Standard Practice for Hot Isostatic Pressing of Steel Stainless Steel and Related Alloy Castings《钢 不锈钢和相关合金铸件的高温等静力压制的标准实施规程》.pdf
  • ASTM A1080-2015 Standard Practice for Hot Isostatic Pressing of Steel Stainless Steel and Related Alloy Castings《高温等静力压制钢 不锈钢和相关合金铸件的标准实践规程》.pdf ASTM A1080-2015 Standard Practice for Hot Isostatic Pressing of Steel Stainless Steel and Related Alloy Castings《高温等静力压制钢 不锈钢和相关合金铸件的标准实践规程》.pdf
  • ASTM A1081 A1081M-2012 Standard Test Method for Evaluating Bond of Seven-Wire Steel Prestressing Strand《七股预应力钢绞线粘合评估的标准试验方法》.pdf ASTM A1081 A1081M-2012 Standard Test Method for Evaluating Bond of Seven-Wire Steel Prestressing Strand《七股预应力钢绞线粘合评估的标准试验方法》.pdf
  • ASTM A1081 A1081M-2015 Standard Test Method for Evaluating Bond of Seven-Wire Steel Prestressing Strand《评估七股预应力钢绞线粘结性的标准试验方法》.pdf ASTM A1081 A1081M-2015 Standard Test Method for Evaluating Bond of Seven-Wire Steel Prestressing Strand《评估七股预应力钢绞线粘结性的标准试验方法》.pdf
  • 相关搜索

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

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