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

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

国家三级(网络技术)机试模拟试卷 333及答案与解析 一、程序设计题 1 国家三级(网络技术)机试模拟试卷 333答案与解析 一、程序设计题 1 【正确答案】 【试题解析】 首先定义一个循环变量 i,以及分别用来存放四位数分解之后各位数的变量 qw(千位 )、 bw(百位 )、 sw(十位 )和 gw(个位 )。 通过 for循环依次对数组中的每个四位数进行分解,每分解一个四位数,则根据题目要求,判断其 “个位 -百位 -十位 -千位 0”的条件是否满足,当满足条件时,则将 ai的值累加到变量 pjz1中,同时计数变量 cnt的值加 1;如果不满足判断条件,则将四位数累加到变量 pjz2中。当 for循环结束之后,就能等到所有满足条件的四位数之和 pjz1和个数,以及所有不满足条件的四位数之和 pjz2。 最后将变量 pjz1的值除以变量 cnt的值,得到所有满足条件的四位数的平均值并赋给变量 pjz1,将变量 pjz2的值除以 300减去变量 cnt的差,得到所有不满足条件的四位数的平均值并赋给变量 pjz2。 本题中, pjz1、 pjz2和 cnt三个变量在源程序中已经定义,在该子程序中就不需要再重新定义了。

展开阅读全文
相关资源
猜你喜欢
  • ANSI UL 636-2018 UL Standard for Safety Holdup Alarm Units and Systems (Eleventh Edition)《安全防盗报警装置和系统标准》.pdf ANSI UL 636-2018 UL Standard for Safety Holdup Alarm Units and Systems (Eleventh Edition)《安全防盗报警装置和系统标准》.pdf
  • ANSI UL 639-2007 UL Standard for Safety Intrusion-Detection Units (Eighth Edition Reprint with Revisions Through and Including July 09 2018)《侵入探测装置标准》.pdf ANSI UL 639-2007 UL Standard for Safety Intrusion-Detection Units (Eighth Edition Reprint with Revisions Through and Including July 09 2018)《侵入探测装置标准》.pdf
  • ANSI UL 641-2010 UL Standard for Safety Type L Low-Temperature Venting Systems (Eighth Edition Reprint with Revisions Through and Including April 23 2018)《L型低温通风系统的安全性标准》.pdf ANSI UL 641-2010 UL Standard for Safety Type L Low-Temperature Venting Systems (Eighth Edition Reprint with Revisions Through and Including April 23 2018)《L型低温通风系统的安全性标准》.pdf
  • ANSI UL 6420-2012 UL Standard for Safety Equipment Used for System Isolation and Rated as a Single Unit (First Edition Reprint with Revisions Through and Including January 8 2018)《.pdf ANSI UL 6420-2012 UL Standard for Safety Equipment Used for System Isolation and Rated as a Single Unit (First Edition Reprint with Revisions Through and Including January 8 2018)《.pdf
  • ANSI UL 644-2014 UL Standard for Safety Container Assemblies for LP-Gas (Ninth Edition).pdf ANSI UL 644-2014 UL Standard for Safety Container Assemblies for LP-Gas (Ninth Edition).pdf
  • ANSI UL 651-2011 UL Standard for Safety Schedule 40 80 Type EB and A Rigid PVC Conduit and Fittings (Eighth Edition Reprint with revisions through and including June 15 2016)《附表40和.pdf ANSI UL 651-2011 UL Standard for Safety Schedule 40 80 Type EB and A Rigid PVC Conduit and Fittings (Eighth Edition Reprint with revisions through and including June 15 2016)《附表40和.pdf
  • ANSI UL 651A-2011 UL Standard for Safety Schedule 40 and 80 High Density Polyethylene (HDPE) Conduit (Fifth Edition Reprint with revisions through and including March 10 2017)《EB型和.pdf ANSI UL 651A-2011 UL Standard for Safety Schedule 40 and 80 High Density Polyethylene (HDPE) Conduit (Fifth Edition Reprint with revisions through and including March 10 2017)《EB型和.pdf
  • ANSI UL 66-2002 UL Standard for Safety Fixture Wire (First Edition Reprint with Revisions Through and Including April 12 2016).pdf ANSI UL 66-2002 UL Standard for Safety Fixture Wire (First Edition Reprint with Revisions Through and Including April 12 2016).pdf
  • ANSI UL 668-2004 UL Standard for Safety Hose Valves for Fire-Protection Service (Tenth Edition Reprint with Revisions Through and Including July 12 2016)《消防设备用水带阀》.pdf ANSI UL 668-2004 UL Standard for Safety Hose Valves for Fire-Protection Service (Tenth Edition Reprint with Revisions Through and Including July 12 2016)《消防设备用水带阀》.pdf
  • 相关搜索

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

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