【计算机类职业资格】计算机四级机试-1-2及答案解析.doc

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

1、计算机四级机试-1-2 及答案解析(总分:100.00,做题时间:90 分钟)一、上机题 lilist-style-typ(总题数:1,分数:100.00)1.已知数据文件 in. dat 中存有 10 组每组 20 个四位数的数据,每个数据间用空格分隔,调用读函数ReadDat()把这 10 组数据存人数组 aa 中(其中,aa 定义为 int aa 1020)。请编制一函数 jsVal(),其功能是:首先将每组 20 个数按从小到大的顺序进行排序,排序后的结果仍存人数组 aa 中,接着去掉每组中最中间的两个数以及最小的两个数,然后计算其余 16 个数的算术平均值,并将计算结果按组的顺序依次

2、存人数组 bb 中(其中,数组 bb 定义为 float bb10),最后调用写函数 WriteDat()把结果 bb 输出到文件 out.dat 中。注意:部分源程序已给出。程序中已定义全局变量:aa1020、bb10。请勿改动数据文件 in. dat 中的任何数据、主函数 main()、读函数 ReadDat()和写函数 WriteDat()的内容。试题程序# include int aa1020;float bb10;void jsVal()void ReadDat()int i,j;FILE * fp;fp=fopen(“in, dat“,“r“);for(i=0; ifor(j=0 dfclose(fp);void main()int i;ReadDat(); /*读数据*/jsVal(); / *按要求计算* /for(i=0;iprinff(“%6.21f/n“, bbi)WriteDat(); / *输出结果到文件* /WriteDat()FILE * fp;int i;fp=fopen(“out, dat“,“w“);for(i=0; iaaik+1) t=aaik; aaik=aaik+1; aaik+1=t;bbi=(sum-aai0-aai1-aaii9-aai10)/16;sum=0)解析:

展开阅读全文
相关资源
猜你喜欢
  • ASD-STAN PREN 3334-1988 Aerospace Series Aluminium Alloy (7050) Solution Treated Controlled Stretched and Artificially Aged (T7651) Plate 6 Less Than or Equal to a Less Than or Equ.pdf ASD-STAN PREN 3334-1988 Aerospace Series Aluminium Alloy (7050) Solution Treated Controlled Stretched and Artificially Aged (T7651) Plate 6 Less Than or Equal to a Less Than or Equ.pdf
  • ASD-STAN PREN 3335-2003 Aerospace Series Aluminium Alloy AL-P7475-O2 Sheet for Superplastic Forming (SPF) 0 8 mm Less Than or Equal to a Less Than or Equal to 6 mm (Edition P 3)《航空.pdf ASD-STAN PREN 3335-2003 Aerospace Series Aluminium Alloy AL-P7475-O2 Sheet for Superplastic Forming (SPF) 0 8 mm Less Than or Equal to a Less Than or Equal to 6 mm (Edition P 3)《航空.pdf
  • ASD-STAN PREN 3336-1999 Aerospace Series Aluminium Alloy AL-P7150-T651 Plate 6mm Less Than a Less Than or Equal to 40mm (Edition P 3)《航空航天系列 6mm<a≤40mm的铝合金AL-P7150-T651厚板材 第P3版》.pdf ASD-STAN PREN 3336-1999 Aerospace Series Aluminium Alloy AL-P7150-T651 Plate 6mm Less Than a Less Than or Equal to 40mm (Edition P 3)《航空航天系列 6mm<a≤40mm的铝合金AL-P7150-T651厚板材 第P3版》.pdf
  • ASD-STAN PREN 3337-1988 Aerospace Series Aluminium Alloy (7010) Solution Treated and Artificially Aged (T74511) Extruded Bars and Sections (a or D) Less Than or Equal to 130 mm wit.pdf ASD-STAN PREN 3337-1988 Aerospace Series Aluminium Alloy (7010) Solution Treated and Artificially Aged (T74511) Extruded Bars and Sections (a or D) Less Than or Equal to 130 mm wit.pdf
  • ASD-STAN PREN 3338-2003 Aerospace Series Aluminium Alloy AL-P7050-T74511 Extruded Bar and Section a or D Less Than or Equal to 150 mm with Peripheral Coarse Grain Control (Edition .pdf ASD-STAN PREN 3338-2003 Aerospace Series Aluminium Alloy AL-P7050-T74511 Extruded Bar and Section a or D Less Than or Equal to 150 mm with Peripheral Coarse Grain Control (Edition .pdf
  • ASD-STAN PREN 3339-1998 Aerospace Series Aluminium Alloy AL-P7010-T76 Die Forgings a Less Than or Equal to 200 mm (Edition P 2)《航空航天系列 a≤150mm的铝合金AL-P7010-T76模锻件 第P2版》.pdf ASD-STAN PREN 3339-1998 Aerospace Series Aluminium Alloy AL-P7010-T76 Die Forgings a Less Than or Equal to 200 mm (Edition P 2)《航空航天系列 a≤150mm的铝合金AL-P7010-T76模锻件 第P2版》.pdf
  • ASD-STAN PREN 3340-1988 Aerospace Series Aluminium Alloy (7050) Solution Treated and Artificially Aged (T76) Die Forgings a Less Than or Equal to 200 mm (Issue P 1)《航空航天系列 a≤200mm的.pdf ASD-STAN PREN 3340-1988 Aerospace Series Aluminium Alloy (7050) Solution Treated and Artificially Aged (T76) Die Forgings a Less Than or Equal to 200 mm (Issue P 1)《航空航天系列 a≤200mm的.pdf
  • ASD-STAN PREN 3341-2003 Aerospace Series Aluminium Alloy AL-P6061-T4 or T42 Sheet and Strip 0 4 mm Less Than or Equal to a Less Than or Equal to 6 mm (Edition P 3)《航空航天系列 0 4mm≤a≤6.pdf ASD-STAN PREN 3341-2003 Aerospace Series Aluminium Alloy AL-P6061-T4 or T42 Sheet and Strip 0 4 mm Less Than or Equal to a Less Than or Equal to 6 mm (Edition P 3)《航空航天系列 0 4mm≤a≤6.pdf
  • ASD-STAN PREN 3342-2003 Aerospace Series Aluminium Alloy AL-P6061-T4 or T42 Drawn or Extruded Bar and Section a or D Less Than or Equal to 150 mm (Edition P 3)《航空航天系列 a或D≤150mm的铝合金.pdf ASD-STAN PREN 3342-2003 Aerospace Series Aluminium Alloy AL-P6061-T4 or T42 Drawn or Extruded Bar and Section a or D Less Than or Equal to 150 mm (Edition P 3)《航空航天系列 a或D≤150mm的铝合金.pdf
  • 相关搜索

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

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