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

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

1、国家三级(网络技术)机试-试卷 61 及答案解析(总分:2.00,做题时间:90 分钟)一、程序设计题(总题数:1,分数:2.00)1. (分数:2.00)_国家三级(网络技术)机试-试卷 61 答案解析(总分:2.00,做题时间:90 分钟)一、程序设计题(总题数:1,分数:2.00)1. (分数:2.00)_正确答案:(正确答案: )解析:解析:首先,本题要定义多个变量,包括一个循环变量 k:一个用来保存 k 平方的变量 n;一个数组下标变量 cnt 并赋初值为 0;存放三位数分解之后各位数的变量 a(百位)、b(十位)、c(个位)。 通过 for 循环筛选满足条件的数。大致分 4 步设定

2、筛选条件,第一步设定判断条件,循环变量的初值从 10开始,因为从 10 开始的数,其平方数最少也是 3 位数,循环的终止条件此处先留空,在后面的循环体中进行设定,每执行一次循环,变量 k 的值加 1;第二步指定变量 n 的值等于 k 的平方,判断变量 n 的值如果小于 100 则进入下一次循环,如果 n 值大于 999 则退出整个 for 循环,这表示只有 n 值在 100 和999(包含)之间才执行条件表达式后面的语句;第 3 步是分解满足条件的三位数,得到每位数上的数字,然后通过 if 条件语句判断三个数中是否有两个数相等,即可以通过表达式“(a-b)*(a-c)*(b-c)=0”进行判断;第四步将满足条件的数输出,并把满足条件的三位数 n 赋给数组元素 bbcnt,同时数组下标变量cnt 加 1。 返回满足条件的三位数的个数 cnt。

展开阅读全文
相关资源
猜你喜欢
  • DIN ISO 20727-2006 Textile machinery - Mixing bale openers for cotton spinning - Vocabulary and principles of construction (ISO 20727 2004) text in German English and French《纺织机械 棉.pdf DIN ISO 20727-2006 Textile machinery - Mixing bale openers for cotton spinning - Vocabulary and principles of construction (ISO 20727 2004) text in German English and French《纺织机械 棉.pdf
  • DIN ISO 20773-2017 Cigarettes - Determination of nicotine-free dry particulate matter and nicotine in sidestream smoke - Method using a routine analytical linear smoking machine eq卷.pdf DIN ISO 20773-2017 Cigarettes - Determination of nicotine-free dry particulate matter and nicotine in sidestream smoke - Method using a routine analytical linear smoking machine eq卷.pdf
  • DIN ISO 20774-2017 Cigarettes - Determination of carbon monoxide in sidestream smoke - Method using a routine analytical linear smoking machine equipped with a fishtail chimney (IS.pdf DIN ISO 20774-2017 Cigarettes - Determination of carbon monoxide in sidestream smoke - Method using a routine analytical linear smoking machine equipped with a fishtail chimney (IS.pdf
  • DIN ISO 20785-2-2016 Dosimetry for exposures to cosmic radiation in civilian aircraft - Part 2 Characterization of instrument response (ISO 20785-2 2011)《民用飞机曝露于宇宙辐射的放射量测定 第2部分 仪器响.pdf DIN ISO 20785-2-2016 Dosimetry for exposures to cosmic radiation in civilian aircraft - Part 2 Characterization of instrument response (ISO 20785-2 2011)《民用飞机曝露于宇宙辐射的放射量测定 第2部分 仪器响.pdf
  • DIN ISO 20816-1-2017 Mechanical vibration - Measurement and evaluation of machine vibration - Part 1 General guidelines (ISO 20816-1 2016)《机械振动 机械振动的测量和评估 第1部分 通用指南(ISO 20816-1-201.pdf DIN ISO 20816-1-2017 Mechanical vibration - Measurement and evaluation of machine vibration - Part 1 General guidelines (ISO 20816-1 2016)《机械振动 机械振动的测量和评估 第1部分 通用指南(ISO 20816-1-201.pdf
  • DIN ISO 20966-2008 Automatic milking installations - Requirements and testing (ISO 20966 2007) English version of DIN ISO 20966 2008-04《自动挤奶设备 要求和测试》.pdf DIN ISO 20966-2008 Automatic milking installations - Requirements and testing (ISO 20966 2007) English version of DIN ISO 20966 2008-04《自动挤奶设备 要求和测试》.pdf
  • DIN ISO 2108-2007 Information and documentation - International standard book numbering (ISBN) (ISO 2108 2005) English version of DIN ISO 2108 2007-01《信息和文件管理 国际标准图书编号(ISBN)(ISO 21.pdf DIN ISO 2108-2007 Information and documentation - International standard book numbering (ISBN) (ISO 2108 2005) English version of DIN ISO 2108 2007-01《信息和文件管理 国际标准图书编号(ISBN)(ISO 21.pdf
  • DIN ISO 21147-2005 Fine-cut tobacco and smoking articles made from it - Survey and analysis of consumer-made articles (ISO 21147 2003)《切细烟草及其烟制品 吸烟后所产生物质的检查和分析》.pdf DIN ISO 21147-2005 Fine-cut tobacco and smoking articles made from it - Survey and analysis of consumer-made articles (ISO 21147 2003)《切细烟草及其烟制品 吸烟后所产生物质的检查和分析》.pdf
  • DIN ISO 2115-2001 Plastics - Polymer dispersions - Determination of white point temperature and minimum film-forming temperature (ISO 2115 1996)《塑料 聚合物分散体 白点温度和最低膜成形温度测定》.pdf DIN ISO 2115-2001 Plastics - Polymer dispersions - Determination of white point temperature and minimum film-forming temperature (ISO 2115 1996)《塑料 聚合物分散体 白点温度和最低膜成形温度测定》.pdf
  • 相关搜索

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

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