【计算机类职业资格】国家三级(网络技术)机试-试卷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。

展开阅读全文
相关资源
猜你喜欢
  • ISO 21368-2005 Adhesives - Guidelines for the fabrication of adhesively bonded structures and reporting procedures suitable for the risk evaluation of such stru.pdf ISO 21368-2005 Adhesives - Guidelines for the fabrication of adhesively bonded structures and reporting procedures suitable for the risk evaluation of such stru.pdf
  • ISO 2139-1975 Continuous mechanical handling equipment for loose bulk materials Oscillating conveyors and shaking or reciprocating feeders with tubular trough《松.pdf ISO 2139-1975 Continuous mechanical handling equipment for loose bulk materials Oscillating conveyors and shaking or reciprocating feeders with tubular trough《松.pdf
  • ISO 214-1976 Documentation Abstracts for publications and documentation《文献 出版物和文献的摘要》.pdf ISO 214-1976 Documentation Abstracts for publications and documentation《文献 出版物和文献的摘要》.pdf
  • ISO 2140-1975 Continuous mechanical handling equipment for loose bulk materials Apron conveyors《松散物料连续搬运设备 挡板输送机》.pdf ISO 2140-1975 Continuous mechanical handling equipment for loose bulk materials Apron conveyors《松散物料连续搬运设备 挡板输送机》.pdf
  • ISO 21413-2005 Manual methods for the measurement of a groundwater level in a well《井地下水位测量的手工方法》.pdf ISO 21413-2005 Manual methods for the measurement of a groundwater level in a well《井地下水位测量的手工方法》.pdf
  • ISO 21415-1-2006 Wheat and wheat flour - Gluten content - Part 1 Determination of wet gluten by a manual method《小麦和小麦粉 谷蛋白含量 第1部分 人工湿的谷蛋白的测定》.pdf ISO 21415-1-2006 Wheat and wheat flour - Gluten content - Part 1 Determination of wet gluten by a manual method《小麦和小麦粉 谷蛋白含量 第1部分 人工湿的谷蛋白的测定》.pdf
  • ISO 21415-3-2006 Wheat and wheat flour - Gluten content - Part 3 Determination of dry gluten from wet gluten by an oven drying method《小麦和小麦粉 谷蛋白含量 第3部分 利用烤炉烘干法使.pdf ISO 21415-3-2006 Wheat and wheat flour - Gluten content - Part 3 Determination of dry gluten from wet gluten by an oven drying method《小麦和小麦粉 谷蛋白含量 第3部分 利用烤炉烘干法使.pdf
  • ISO 21415-4-2006 Wheat and wheat flour - Gluten content - Part 4 Determination of dry gluten from wet gluten by a rapid drying method《小麦和小麦粉 谷蛋白含量 第4部分 利用快速烘干法使.pdf ISO 21415-4-2006 Wheat and wheat flour - Gluten content - Part 4 Determination of dry gluten from wet gluten by a rapid drying method《小麦和小麦粉 谷蛋白含量 第4部分 利用快速烘干法使.pdf
  • ISO 21427-2-2006 Water quality - Evaluation of genotoxicity by measurement of the induction of micronuclei - Part 2 Mixed population method using the cell line .pdf ISO 21427-2-2006 Water quality - Evaluation of genotoxicity by measurement of the induction of micronuclei - Part 2 Mixed population method using the cell line .pdf
  • 相关搜索

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

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