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

展开阅读全文
相关资源
猜你喜欢
  • BS EN ISO 10873-2010 Dentistry Denture adhesives《牙科学 假牙粘合剂》.pdf BS EN ISO 10873-2010 Dentistry Denture adhesives《牙科学 假牙粘合剂》.pdf
  • BS EN ISO 10874-2012 Resilient textile and laminate floor coverings Classification《弹力铺地织物及浸渍纸层压木质地板 分类》.pdf BS EN ISO 10874-2012 Resilient textile and laminate floor coverings Classification《弹力铺地织物及浸渍纸层压木质地板 分类》.pdf
  • BS EN ISO 10882-1-2011 Health and safety in welding and allied processes Sampling of airborne particles and gases in the operator-s breathing zone Sampling of airborne particles《焊接.pdf BS EN ISO 10882-1-2011 Health and safety in welding and allied processes Sampling of airborne particles and gases in the operator-s breathing zone Sampling of airborne particles《焊接.pdf
  • BS EN ISO 10882-2-2000 Health and safety in welding and allied processes - Sampling of airborne particles and gases in the operator-s breathing zone - Sampling of gases《焊接及相关工艺的卫生与.pdf BS EN ISO 10882-2-2000 Health and safety in welding and allied processes - Sampling of airborne particles and gases in the operator-s breathing zone - Sampling of gases《焊接及相关工艺的卫生与.pdf
  • BS EN ISO 10890-2010 Paints and varnishes Modelling of biocide release rate from antifouling paints by mass-balance calculation《涂料和清漆 利用物质平衡估算法对来自防垢油漆的杀虫剂释放率建模》.pdf BS EN ISO 10890-2010 Paints and varnishes Modelling of biocide release rate from antifouling paints by mass-balance calculation《涂料和清漆 利用物质平衡估算法对来自防垢油漆的杀虫剂释放率建模》.pdf
  • BS EN ISO 10893-1-2011 Non-destructive testing of steel tubes Automated electromagnetic testing of seamless and welded (except submerged arc-welded) steel tubes for the verificatio.pdf BS EN ISO 10893-1-2011 Non-destructive testing of steel tubes Automated electromagnetic testing of seamless and welded (except submerged arc-welded) steel tubes for the verificatio.pdf
  • BS EN ISO 10893-10-2011 Non-destructive testing of steel tubes Automated full peripheral ultrasonic testing of seamless and welded (except submerged arc-welded) steel tubes for thee.pdf BS EN ISO 10893-10-2011 Non-destructive testing of steel tubes Automated full peripheral ultrasonic testing of seamless and welded (except submerged arc-welded) steel tubes for thee.pdf
  • BS EN ISO 10893-11-2011 Non-destructive testing of steel tubes Automated ultrasonic testing of the weld seam of welded steel tubes for the detection of longitudinal and or transver.pdf BS EN ISO 10893-11-2011 Non-destructive testing of steel tubes Automated ultrasonic testing of the weld seam of welded steel tubes for the detection of longitudinal and or transver.pdf
  • BS EN ISO 10893-12-2011 Non-destructive testing of steel tubes Automated full peripheral ultrasonic thickness testing of seamless and welded (except submerged arc-welded) steel tub.pdf BS EN ISO 10893-12-2011 Non-destructive testing of steel tubes Automated full peripheral ultrasonic thickness testing of seamless and welded (except submerged arc-welded) steel tub.pdf
  • 相关搜索

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

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