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

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

1、计算机三级数据库技术(上机操作)机试模拟试卷 1及答案与解析 一、程序设计题 1 程序 progl c的功能是:选出大于 100小于 1000范围之内的所有个位数字与十位数字之和被 10除所得余数恰是百位数字的所有素数 (如 293)。计算并输出上述这些素数的个数 cnt以及这些素数值的和 sum。请编写函数 countValue()实现程序要求,最后调用函数 writeDAT()把结果 cnt和 sum输出到文件 out dat中。 【试题程序】 #include int cnt, sum; void writeDAT(); void countValue() void main() cnt

2、sum=0; countValue(); printf(”素数的个数 = d n”, cnt); printf(”满足条件素数值的和 = d”, sum); writeDAT(): vojd writeDAT() FII*E*fP; fp=fopen(”out dat”, ”w”); fprintf(fp, ” d n d n”。 cnt, sum); fclose(fp); 计算机三级数据库技术(上机操作)机试模拟试卷 1答案与解析 一、程序设计题 1 【正确答案】 void countValue() int i j; *定义变量 * int a1, a2, a3; for(i=101;i1000, i+) al=i 10; *数位分解 * a2=i 100 10; a3=i 100; if(a3: =(a2+a1)9, 610) *判断条件 * for(j=2;ji;j+) *检查素数 k if(i j=0) break; ifCj=i) *统计结果 * sum+=i; ent+;

展开阅读全文
相关资源
猜你喜欢
  • BS PD IEC TR 62987-2015 Nuclear power plants Instrumentation and control systems important to safety Use of Failure Mode and Effects Analysis (FMEA) and related methods to.pdf BS PD IEC TR 62987-2015 Nuclear power plants Instrumentation and control systems important to safety Use of Failure Mode and Effects Analysis (FMEA) and related methods to.pdf
  • BS PD IEC TR 63020-2016 Digital sheet music Market use cases and related technologies《电子乐谱 市场 使用案例和相关技术》.pdf BS PD IEC TR 63020-2016 Digital sheet music Market use cases and related technologies《电子乐谱 市场 使用案例和相关技术》.pdf
  • BS PD IEC TR 63021-2016 Rotating electrical machinery Natural graphite brush for slip-ring in wound rotor-type induction motor Application information《旋转电机 绕线式感应电动机内的滑环用天然.pdf BS PD IEC TR 63021-2016 Rotating electrical machinery Natural graphite brush for slip-ring in wound rotor-type induction motor Application information《旋转电机 绕线式感应电动机内的滑环用天然.pdf
  • BS PD IEC TR 63036-2016 Electrical interface specification for phase-cut dimmer in phase-cut dimmed lighting systems《舍相调光系统用舍相减光器的电气接口规格》.pdf BS PD IEC TR 63036-2016 Electrical interface specification for phase-cut dimmer in phase-cut dimmed lighting systems《舍相调光系统用舍相减光器的电气接口规格》.pdf
  • BS PD IEC TR 63037-2016 Electrical interface specifications for self ballasted lamps and controlgear in phase-cut dimmed lighting systems《舍相暗光系统用自镇流灯和控制设备的电气接口规格》.pdf BS PD IEC TR 63037-2016 Electrical interface specifications for self ballasted lamps and controlgear in phase-cut dimmed lighting systems《舍相暗光系统用自镇流灯和控制设备的电气接口规格》.pdf
  • BS PD IEC TR 63039-2016 Probabilistic risk analysis of technological systems Estimation of final event rate at a given initial state《技术系统的概率风险分析 评估给定初始状态下的最终事件率》.pdf BS PD IEC TR 63039-2016 Probabilistic risk analysis of technological systems Estimation of final event rate at a given initial state《技术系统的概率风险分析 评估给定初始状态下的最终事件率》.pdf
  • BS PD IEC TR 63040-2016 Guidance on clearances and creepage distances in particular for distances equal to or less than 2 mm Test results of research on influencing parame.pdf BS PD IEC TR 63040-2016 Guidance on clearances and creepage distances in particular for distances equal to or less than 2 mm Test results of research on influencing parame.pdf
  • BS PD IEC TR 63051-2017 Documentation on design automation subjects Mathematical algorithm hardware description languages for system level modeling and verification (HDLMa.pdf BS PD IEC TR 63051-2017 Documentation on design automation subjects Mathematical algorithm hardware description languages for system level modeling and verification (HDLMa.pdf
  • BS PD IEC TR 63065-2017 Guidelines for operation and maintenance of line commutated converter (LCC) HVDC converter station《线路换向换流器(LCC)HVDC换流站运行和维护指南》.pdf BS PD IEC TR 63065-2017 Guidelines for operation and maintenance of line commutated converter (LCC) HVDC converter station《线路换向换流器(LCC)HVDC换流站运行和维护指南》.pdf
  • 相关搜索

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

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