【计算机类职业资格】计算机三级(数据库技术)上机考试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 进行求平均值的计算。

展开阅读全文
相关资源
猜你喜欢
  • ASHRAE OR-05-7-2005 Symposium on Ground-Coupled Heat Pump Design Issues《地面耦合热泵设计问题的研讨会》.pdf ASHRAE OR-05-7-2005 Symposium on Ground-Coupled Heat Pump Design Issues《地面耦合热泵设计问题的研讨会》.pdf
  • ASHRAE OR-05-7-3-2005 A Methodology to Evaluate Pumping Energy Consumption in GCHP Systems《评价GCHP系统的抽水能源消耗的一种方法》.pdf ASHRAE OR-05-7-3-2005 A Methodology to Evaluate Pumping Energy Consumption in GCHP Systems《评价GCHP系统的抽水能源消耗的一种方法》.pdf
  • ASHRAE OR-05-8-1-2005 Air Distribution in Rooms Generated by Textile Terminal-Comparison with Mixing and Displacement Ventilation《混合和置换通风与纺织终端所产生的相比的室内里的空气分配》.pdf ASHRAE OR-05-8-1-2005 Air Distribution in Rooms Generated by Textile Terminal-Comparison with Mixing and Displacement Ventilation《混合和置换通风与纺织终端所产生的相比的室内里的空气分配》.pdf
  • ASHRAE OR-05-8-2-2005 Displacement with Induction Conditioning Our Classrooms in Accordance with ANSI ASA S12 60《感应位移:按照美国ANSI ASA S12 60标准来调理我们的教室》.pdf ASHRAE OR-05-8-2-2005 Displacement with Induction Conditioning Our Classrooms in Accordance with ANSI ASA S12 60《感应位移:按照美国ANSI ASA S12 60标准来调理我们的教室》.pdf
  • ASHRAE OR-05-8-2005 Symposium on Innovations and Advances in Room Air Distrbution Part 2 Numerical Experimental and Application Articles《在室内空调器分布上的创新和进步的研讨会 第2部分 数值 实验和应用的文章》.pdf ASHRAE OR-05-8-2005 Symposium on Innovations and Advances in Room Air Distrbution Part 2 Numerical Experimental and Application Articles《在室内空调器分布上的创新和进步的研讨会 第2部分 数值 实验和应用的文章》.pdf
  • ASHRAE OR-05-8-3-2005 The Effect of Supply Air Systems on Kitchen Thermal Environment《对厨房热环境的供气系统的影响》.pdf ASHRAE OR-05-8-3-2005 The Effect of Supply Air Systems on Kitchen Thermal Environment《对厨房热环境的供气系统的影响》.pdf
  • ASHRAE OR-05-8-4-2005 Numerical Simulation of Airflow and Airborne Pathogen Transport in Aircraft Cabins - Part 1 Numerical Simulation of the Flow Field《气流和在飞机舱空中传播的病原的数值模拟-第1部分 流场.pdf ASHRAE OR-05-8-4-2005 Numerical Simulation of Airflow and Airborne Pathogen Transport in Aircraft Cabins - Part 1 Numerical Simulation of the Flow Field《气流和在飞机舱空中传播的病原的数值模拟-第1部分 流场.pdf
  • ASHRAE OR-05-8-5-2005 Numerical Simulation of Airflow and Airborne Pathogen Transport in Aircraft Cabins - Part II Numerical Simulation Airborne Pathogen Transport《在飞机舱里的病原空中传播和气流数.pdf ASHRAE OR-05-8-5-2005 Numerical Simulation of Airflow and Airborne Pathogen Transport in Aircraft Cabins - Part II Numerical Simulation Airborne Pathogen Transport《在飞机舱里的病原空中传播和气流数.pdf
  • ASHRAE OR-05-8-6-2005 Feasibility Study of Using Various Instruments for Measurement of Air Motion in a Test Room《为测量空气运动在一个试验室的综合运用各种手段的可行性研究》.pdf ASHRAE OR-05-8-6-2005 Feasibility Study of Using Various Instruments for Measurement of Air Motion in a Test Room《为测量空气运动在一个试验室的综合运用各种手段的可行性研究》.pdf
  • 相关搜索
    资源标签

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

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