【计算机类职业资格】计算机三级(数据库技术)上机考试16及答案解析.doc

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

1、计算机三级(数据库技术)上机考试 16 及答案解析(总分:-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; cl

2、rscr(); 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 PD IEC TR 61156-1-6-2016 Multicore and symmetrical pair quad cables for digital communications Nominal DC-resistance values of floor-wiring and work-area cables for digital comm.pdf BS PD IEC TR 61156-1-6-2016 Multicore and symmetrical pair quad cables for digital communications Nominal DC-resistance values of floor-wiring and work-area cables for digital comm.pdf
  • BS PD IEC TR 61282-13-2014 Fibre optic communication system design guides Guidance on in-service PMD and CD characterization of fibre optic links《纤维光学通信系统设计指南 纤维光学连接使用PMD和CD特性指南》.pdf BS PD IEC TR 61282-13-2014 Fibre optic communication system design guides Guidance on in-service PMD and CD characterization of fibre optic links《纤维光学通信系统设计指南 纤维光学连接使用PMD和CD特性指南》.pdf
  • BS PD IEC TR 61282-14-2016 Fibre optic communication system design guides Determination of the uncertainties of attenuation measurements in fibre plants《光纤通信系统设计指南 纤维植物中衰减测量不确定度的测定.pdf BS PD IEC TR 61282-14-2016 Fibre optic communication system design guides Determination of the uncertainties of attenuation measurements in fibre plants《光纤通信系统设计指南 纤维植物中衰减测量不确定度的测定.pdf
  • BS PD IEC TR 61282-15-2017 Fibre optic communication system design guides Cable plant and link Testing multi-fibre optic cable plant terminated with MPO connectors《光纤通信系统设计指南 电缆厂和链.pdf BS PD IEC TR 61282-15-2017 Fibre optic communication system design guides Cable plant and link Testing multi-fibre optic cable plant terminated with MPO connectors《光纤通信系统设计指南 电缆厂和链.pdf
  • BS PD IEC TR 61282-4-2013 Fibre optic communication system design guides Accommodation and utilization of non-linear effects《纤维光学通信系统设计指南 非线性效应的适应性和应用》.pdf BS PD IEC TR 61282-4-2013 Fibre optic communication system design guides Accommodation and utilization of non-linear effects《纤维光学通信系统设计指南 非线性效应的适应性和应用》.pdf
  • BS PD IEC TR 61292-4-2014 Optical amplifiers Maximum permissible optical power for the damage-free and safe use of optical amplifiers including Raman amplifiers《光学放大器 光学放大器 (包括拉曼放大.pdf BS PD IEC TR 61292-4-2014 Optical amplifiers Maximum permissible optical power for the damage-free and safe use of optical amplifiers including Raman amplifiers《光学放大器 光学放大器 (包括拉曼放大.pdf
  • BS PD IEC TR 61547-1-2015 Equipment for general lighting purposes EMC immunity requirements An objective voltage fluctuation immunity test method《通用照明设备 EMC抗扰度要求 目标电压波动抗扰度试验方法》.pdf BS PD IEC TR 61547-1-2015 Equipment for general lighting purposes EMC immunity requirements An objective voltage fluctuation immunity test method《通用照明设备 EMC抗扰度要求 目标电压波动抗扰度试验方法》.pdf
  • BS PD IEC TR 61788-20-2014 Superconductivity Superconducting wires Categories of practical superconducting wires General characteristics and guidance《超导性 超导线材 实用超导线材的种类 一般特性和指南》.pdf BS PD IEC TR 61788-20-2014 Superconductivity Superconducting wires Categories of practical superconducting wires General characteristics and guidance《超导性 超导线材 实用超导线材的种类 一般特性和指南》.pdf
  • BS PD IEC TR 61850-90-2-2016 Communication networks and systems for power utility automation Using IEC 61850 for communication between substations and control centres《电力事业自动化通信网络和系.pdf BS PD IEC TR 61850-90-2-2016 Communication networks and systems for power utility automation Using IEC 61850 for communication between substations and control centres《电力事业自动化通信网络和系.pdf
  • 相关搜索
    资源标签

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

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