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

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

1、计算机三级(网络技术)上机考试 3 及答案解析(总分:-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; clrs

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

展开阅读全文
相关资源
猜你喜欢
  • ANSI ASTM D4865-2009 Standard Guide for Generation and Dissipation of Static Electricity in Petroleum Fuel Systems《石油燃料系统中静电的产生和耗散指南》.pdf ANSI ASTM D4865-2009 Standard Guide for Generation and Dissipation of Static Electricity in Petroleum Fuel Systems《石油燃料系统中静电的产生和耗散指南》.pdf
  • ANSI ASTM D4880-2014 Standard Test Method for Salt Water Proofness of Insulating Varnishes Over Enamelled Magnet Wire.pdf ANSI ASTM D4880-2014 Standard Test Method for Salt Water Proofness of Insulating Varnishes Over Enamelled Magnet Wire.pdf
  • ANSI ASTM D4881-2005 Standard Test Method for Thermal Endurance of Varnished Fibrous- or Film-Wrapped Magnet Wire《漆包纤维或薄膜缠绕磁线的耐热性标准试验方法》.pdf ANSI ASTM D4881-2005 Standard Test Method for Thermal Endurance of Varnished Fibrous- or Film-Wrapped Magnet Wire《漆包纤维或薄膜缠绕磁线的耐热性标准试验方法》.pdf
  • ANSI ASTM D4882-2005 Standard Test Method for Bond Strength of Electrical Insulating Varnishes by the Twisted-Coil Test《用扭转线圈试验测定电绝缘清漆粘结强度的试验方法》.pdf ANSI ASTM D4882-2005 Standard Test Method for Bond Strength of Electrical Insulating Varnishes by the Twisted-Coil Test《用扭转线圈试验测定电绝缘清漆粘结强度的试验方法》.pdf
  • ANSI ASTM D4935-2010 Standard Test Method for Measuring the Electromagnetic Shielding Effectiveness of Planar Materials《测量平面材料电磁屏蔽效率的标准试验方法》.pdf ANSI ASTM D4935-2010 Standard Test Method for Measuring the Electromagnetic Shielding Effectiveness of Planar Materials《测量平面材料电磁屏蔽效率的标准试验方法》.pdf
  • ANSI ASTM D495-2014 Standard Test Method for High-Voltage Low-Current Dry Arc Resistance of Solid Electrical Insulation.pdf ANSI ASTM D495-2014 Standard Test Method for High-Voltage Low-Current Dry Arc Resistance of Solid Electrical Insulation.pdf
  • ANSI ASTM D4967-1999 Standard Guide for Selecting Materials to Be Used for Insulation Jacketing and Strength Components in Fiber-Optic Cables《光缆绝缘套管和强度元件材料选用指南(10.02)》.pdf ANSI ASTM D4967-1999 Standard Guide for Selecting Materials to Be Used for Insulation Jacketing and Strength Components in Fiber-Optic Cables《光缆绝缘套管和强度元件材料选用指南(10.02)》.pdf
  • ANSI ASTM D5001-2010 Standard Test Method for Measurement of Lubricity of Aviation Turbine Fuels by the Ball-on-Cylinder Lubricity Evaluator (BOCLE)《用球柱式(BOCLE)润滑性评定仪测量航空涡轮机燃油润滑性的试.pdf ANSI ASTM D5001-2010 Standard Test Method for Measurement of Lubricity of Aviation Turbine Fuels by the Ball-on-Cylinder Lubricity Evaluator (BOCLE)《用球柱式(BOCLE)润滑性评定仪测量航空涡轮机燃油润滑性的试.pdf
  • ANSI ASTM D5006-2011 Standard Test Method for Measurement of Fuel System Icing Inhibitors (Ether Type) in Aviation Fuels《测量航空燃料中燃料系统结冰抑制剂(醚型)的试验方法》.pdf ANSI ASTM D5006-2011 Standard Test Method for Measurement of Fuel System Icing Inhibitors (Ether Type) in Aviation Fuels《测量航空燃料中燃料系统结冰抑制剂(醚型)的试验方法》.pdf
  • 相关搜索

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

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