[计算机类试卷]计算机三级数据库技术(上机操作)机试模拟试卷68及答案与解析.doc

上传人:eventdump275 文档编号:505602 上传时间:2018-11-29 格式:DOC 页数:2 大小:24KB
下载 相关 举报
[计算机类试卷]计算机三级数据库技术(上机操作)机试模拟试卷68及答案与解析.doc_第1页
第1页 / 共2页
[计算机类试卷]计算机三级数据库技术(上机操作)机试模拟试卷68及答案与解析.doc_第2页
第2页 / 共2页
亲,该文档总共2页,全部预览完了,如果喜欢就下载吧!
资源描述

1、计算机三级数据库技术(上机操作)机试模拟试卷 68及答案与解析 一、程序设计题 1 函数 ReadDat()实现从数据文件 in dat中读取 1000个十进制整数到数组 XX中,请编写函数 Compute(),分别计算出 XX中数值为奇数的个数 odd,偶数的个数even,平均值 aver以及方差 totfc的值,最后调用函数 WriteDat()把结果输出到out dat文件中。计算方差的公式如下:原始数据文件存放的格式是:每行存放 10个数并用逗号隔开 (每个数均大于 0且小于等于 2000)。【试题程序】 #include #include #include #define MAX 1

2、000 int xxMAX, odd=0, even=0; double aver=0 0, totfc=0 0; void WriteDat(void); int ReadDat(void) FILE*fp; int i; if(fp=fopen(“in dat”, “r”)=NULL) return 1; for(i=0;i 计算机三级数据库技术(上机操作)机试模拟试卷 68答案与解析 一、程序设计题 1 【正确答案】 void Compute(void) int i; *定义变量 * for(i=0;iMAX; i+) *统计求和 * aver+=xxi; if(xxi3 2=1) odd+; else even+; aver =MAX; *求平均值 * for(i=0;iMAX; i+) *求方差值 * totfc+=(XXi一 aver)*(xxi一 aver) MAX:

展开阅读全文
相关资源
猜你喜欢
  • ASTM A928 A928M-2005 Standard Specification for Ferritic Austenitic (Duplex) Stainless Steel Pipe Electric Fusion Welded with Addition of Filler Metal.pdf ASTM A928 A928M-2005 Standard Specification for Ferritic Austenitic (Duplex) Stainless Steel Pipe Electric Fusion Welded with Addition of Filler Metal.pdf
  • ASTM A928 A928M-2008a Standard Specification for Ferritic Austenitic (Duplex) Stainless Steel Pipe Electric Fusion Welded with Addition of Filler Metal.pdf ASTM A928 A928M-2008a Standard Specification for Ferritic Austenitic (Duplex) Stainless Steel Pipe Electric Fusion Welded with Addition of Filler Metal.pdf
  • ASTM A928 A928M-2009 Standard Specification for Ferritic Austenitic (Duplex) Stainless Steel Pipe Electric Fusion Welded with Addition of Filler Metal《加填料金属电熔焊铁素体 奥氏体(二联)不锈钢管标准规范》.pdf ASTM A928 A928M-2009 Standard Specification for Ferritic Austenitic (Duplex) Stainless Steel Pipe Electric Fusion Welded with Addition of Filler Metal《加填料金属电熔焊铁素体 奥氏体(二联)不锈钢管标准规范》.pdf
  • ASTM A928 A928M-2009a Standard Specification for Ferritic Austenitic (Duplex) Stainless Steel Pipe Electric Fusion Welded with Addition of Filler Metal《填充金属电熔焊铁素体 奥氏体(二联)不锈钢管标准规范》.pdf ASTM A928 A928M-2009a Standard Specification for Ferritic Austenitic (Duplex) Stainless Steel Pipe Electric Fusion Welded with Addition of Filler Metal《填充金属电熔焊铁素体 奥氏体(二联)不锈钢管标准规范》.pdf
  • ASTM A928 A928M-2011 Standard Specification for Ferritic Austenitic (Duplex) Stainless Steel Pipe Electric Fusion Welded with Addition of Filler Metal《具有填充金属的铁素体 奥氏体(双相)不锈钢管电熔焊的标准规.pdf ASTM A928 A928M-2011 Standard Specification for Ferritic Austenitic (Duplex) Stainless Steel Pipe Electric Fusion Welded with Addition of Filler Metal《具有填充金属的铁素体 奥氏体(双相)不锈钢管电熔焊的标准规.pdf
  • ASTM A928 A928M-2013 Standard Specification for Ferritic Austenitic (Duplex) Stainless Steel Pipe Electric Fusion Welded with Addition of Filler Metal《具有填充金属的铁素体 奥氏体(双相)不锈钢管电熔焊的标准规.pdf ASTM A928 A928M-2013 Standard Specification for Ferritic Austenitic (Duplex) Stainless Steel Pipe Electric Fusion Welded with Addition of Filler Metal《具有填充金属的铁素体 奥氏体(双相)不锈钢管电熔焊的标准规.pdf
  • ASTM A928 A928M-2014 Standard Specification for Ferritic Austenitic &40 Duplex&41 Stainless Steel Pipe Electric Fusion Welded with Addition of Filler Metal《具有填充金属的铁素体 奥氏体 (双相) 不锈钢管.pdf ASTM A928 A928M-2014 Standard Specification for Ferritic Austenitic &40 Duplex&41 Stainless Steel Pipe Electric Fusion Welded with Addition of Filler Metal《具有填充金属的铁素体 奥氏体 (双相) 不锈钢管.pdf
  • ASTM A929 A929M-2001(2007) Standard Specification for Steel Sheet Metallic-Coated by the Hot-Dip Process for Corrugated Steel Pipe《波纹钢管用的经热浸处理的金属涂覆薄钢板的标准规范》.pdf ASTM A929 A929M-2001(2007) Standard Specification for Steel Sheet Metallic-Coated by the Hot-Dip Process for Corrugated Steel Pipe《波纹钢管用的经热浸处理的金属涂覆薄钢板的标准规范》.pdf
  • ASTM A929 A929M-2001(2013) Standard Specification for Steel Sheet Metallic-Coated by the Hot-Dip Process for Corrugated Steel Pipe《波纹钢管用经热浸处理的金属涂覆薄钢板标准规格》.pdf ASTM A929 A929M-2001(2013) Standard Specification for Steel Sheet Metallic-Coated by the Hot-Dip Process for Corrugated Steel Pipe《波纹钢管用经热浸处理的金属涂覆薄钢板标准规格》.pdf
  • 相关搜索

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

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