【计算机类职业资格】计算机三级(网络技术)上机考试23及答案解析.doc

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

1、计算机三级(网络技术)上机考试 23 及答案解析(总分:-1.00,做题时间:90 分钟)1.已知在文件 IN13.DAT 中存有若干个(个数 #include #define MAXNUM 200 int xxMAXNUM; int totNum = 0; /* 文件 IN13.DAT 中共有多少个正整数 */ int totCnt = 0; /* 符合条件的正整数的个数 */ double totPjz = 0.0; /* 平均值 */ int ReadDat(void); void Writedat(void); void CalValue(void) main() int i; clr

2、scr(); for(i = 0; i 1; /*将数右移一位*/ if (data%2=0) /*如果右移 1 位后,产生的新数是偶数*/ totCnt+; totPjz+=xxi; /*统计这些数的个数,并将满足条件的原数求和*/ totPjz/=totCnt; /*求满足条件的这些数(右移前的值)的算术平均值*/ )解析:本题的解题思路是首先利用一个 for 循环来依次从数组中取得各数,由于题目要求数组中正整数的个数,因此,零不做任何处理,接着去取下一个数。只要某数大于零,则该数一定是正整数,这时就给变量 totNum(正整数的个数)累加 1,之后把该正整数右移一位后的结果临时保存在变量 data 中,再对这个临时变量进行是否偶数的判断。如果该临时变量中保存的值是偶数,则表明原数符合条件,就给变量totCnt(符合判断条件的正整数个数)累加 1,并把当前的变量 data 右移前的原数的值累加到变量totPjz 中,当所有符合判断条件的数都被找出后,再对 totPjz 进行求平均值的计算。

展开阅读全文
相关资源
猜你喜欢
  • BS ISO 4392-2-2002 Hydraulic fluid power - Determination of characteristics of motors - Startability《液压流体动力 电动机特性的测定 稳定性》.pdf BS ISO 4392-2-2002 Hydraulic fluid power - Determination of characteristics of motors - Startability《液压流体动力 电动机特性的测定 稳定性》.pdf
  • BS ISO 4395-2009 Fluid power systems and components - Cylinder piston rod end types and dimensions《液压传动系统和组件 汽缸活塞杆端型号和尺寸》.pdf BS ISO 4395-2009 Fluid power systems and components - Cylinder piston rod end types and dimensions《液压传动系统和组件 汽缸活塞杆端型号和尺寸》.pdf
  • BS ISO 4397-2011 Fluid power connectors and associated components Nominal outside diameters of tubes and nominal hose sizes《液压连接器和相关部件 管子公称外径和公称软管尺寸》.pdf BS ISO 4397-2011 Fluid power connectors and associated components Nominal outside diameters of tubes and nominal hose sizes《液压连接器和相关部件 管子公称外径和公称软管尺寸》.pdf
  • BS ISO 44001-2017 Collaborative business relationship management systems Requirements and framework《业务合作关系管理系统 要求和框架规范》.pdf BS ISO 44001-2017 Collaborative business relationship management systems Requirements and framework《业务合作关系管理系统 要求和框架规范》.pdf
  • BS ISO 4401-2005 Hydraulic fluid power - Four-port directional control valves - Mounting surfaces《液压流体动力 四孔定向控制阀 安装面》.pdf BS ISO 4401-2005 Hydraulic fluid power - Four-port directional control valves - Mounting surfaces《液压流体动力 四孔定向控制阀 安装面》.pdf
  • BS ISO 4406-2017 Hydraulic fluid power Fluids Method for coding the level of contamination by solid particles《液压传动 油液 固体颗粒污染等级代码法》.pdf BS ISO 4406-2017 Hydraulic fluid power Fluids Method for coding the level of contamination by solid particles《液压传动 油液 固体颗粒污染等级代码法》.pdf
  • BS ISO 4407-2002 Hydraulic fluid power - Fluid contamination - Determination of particulate contamination by the counting method using an optical microscope《液压流体动力 流体污染 用光学显微镜计数法测定.pdf BS ISO 4407-2002 Hydraulic fluid power - Fluid contamination - Determination of particulate contamination by the counting method using an optical microscope《液压流体动力 流体污染 用光学显微镜计数法测定.pdf
  • BS ISO 4409-2007 Hydraulic fluid power - Positive-displacement pumps motors and integral transmissions - Methods of testing and presenting basic steady state performance《液压流体传动 变容真.pdf BS ISO 4409-2007 Hydraulic fluid power - Positive-displacement pumps motors and integral transmissions - Methods of testing and presenting basic steady state performance《液压流体传动 变容真.pdf
  • BS ISO 4411-2008 Hydraulic fluid power - Valves - Determination of pressure differential flow characteristics《液压流体动力 阀门 压差 流量特性的测定》.pdf BS ISO 4411-2008 Hydraulic fluid power - Valves - Determination of pressure differential flow characteristics《液压流体动力 阀门 压差 流量特性的测定》.pdf
  • 相关搜索

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

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