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

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

1、计算机三级数据库技术(上机操作)机试模拟试卷 47及答案与解析 一、程序设计题 1 设有 n个人坐一圈并按顺时针方向从 1到 n编号,从第 s个人开始进行 1到 m的报数。报数到第 m个人。此人出圈,再从他的下一个人重新开始从 1到 m报数。如此进行下去直到所有的人都出圈为止。先要求按出圈次序,每 10个人为一组,给出这 n个人的顺序表。请编写函数 Josegh()实现此功能,并调用函数 WriteDat()把编号按照出圈顺序输出到文件 out dat中。设 n=100, S=1。 m=10进行编程。 【试题程序】 #include #define N 100 #define S 1 #def

2、ine M 10 int p-loo, n, s, m; void WriteDat(void); void Josegh(void) void main() m=M; n=N; s=S; Josegh(); WriteDat(); void WriteDat(void) int i: FILE*fp; fp=fopen(”out dat”, ”W”); for(i=N一 1li=0;i一一 ) printf(” 4d” pi); fprintf(fp, 4 d, pi); if(i 10=O) printf(“、 n”) fprintf(fP, “ n”); fclose(fp); 计算机三级数据库技术(上机操作)机试模拟试卷 47答案与解析 一、程序设计题 1 【正确答案】 void Josegh(void) int i j, temp; *定义变量 * for(i=0; i=2; i一一 ) *依次出圈 * s=(s+m一 1) it temp=pFs; for(j=s; ji一 1, j+) pj=pj+1; pi1=temp;

展开阅读全文
相关资源
猜你喜欢
  • ANSI UL 1559-2011 UL Standard for Safety Insect-Control Equipment C Electrocution Type (Fifth Edition Reprint with revisions through and including November 20 2017)《触电死亡型昆虫控制设备安全标准.pdf ANSI UL 1559-2011 UL Standard for Safety Insect-Control Equipment C Electrocution Type (Fifth Edition Reprint with revisions through and including November 20 2017)《触电死亡型昆虫控制设备安全标准.pdf
  • ANSI UL 1561-2011 UL Standard for Safety Dry-Type General Purpose and Power Transformers (Fourth Edition Reprint with Revisions Through and Including June 16 2015)《干式通用和电力变压器安全性标准》.pdf ANSI UL 1561-2011 UL Standard for Safety Dry-Type General Purpose and Power Transformers (Fourth Edition Reprint with Revisions Through and Including June 16 2015)《干式通用和电力变压器安全性标准》.pdf
  • ANSI UL 1563-2009 UL Standard for Safety Electric Spas Equipment Assemblies and Associated Equipment (Sixth Edition Reprint with revisions through and including October 20 2017)《电热.pdf ANSI UL 1563-2009 UL Standard for Safety Electric Spas Equipment Assemblies and Associated Equipment (Sixth Edition Reprint with revisions through and including October 20 2017)《电热.pdf
  • ANSI UL 1564-2015 UL Standard for Safety Industrial Battery Chargers (Fourth Edition Reprint with Revisions Through and Including August 8 2017).pdf ANSI UL 1564-2015 UL Standard for Safety Industrial Battery Chargers (Fourth Edition Reprint with Revisions Through and Including August 8 2017).pdf
  • ANSI UL 1565-2013 UL Standard for Safety Positioning Devices (Fifth Edition Reprint with revisions through and including May 5 2017)《定位装置安全性标准(提案日期 9-28-12)》.pdf ANSI UL 1565-2013 UL Standard for Safety Positioning Devices (Fifth Edition Reprint with revisions through and including May 5 2017)《定位装置安全性标准(提案日期 9-28-12)》.pdf
  • ANSI UL 1567-2012 UL Standard for Safety Receptacles and Switches Intended for Use with Aluminum Wire (Fifth Edition Reprint with revisions through and including July 15 2016)《铝线用插.pdf ANSI UL 1567-2012 UL Standard for Safety Receptacles and Switches Intended for Use with Aluminum Wire (Fifth Edition Reprint with revisions through and including July 15 2016)《铝线用插.pdf
  • ANSI UL 1569-2014 UL Standard for Safety Metal-Clad Cables (Fourth Edition Reprint with revisions through and including July 6 2016).pdf ANSI UL 1569-2014 UL Standard for Safety Metal-Clad Cables (Fourth Edition Reprint with revisions through and including July 6 2016).pdf
  • ANSI UL 1569-2018 UL Standard for Safety Metal-Clad Cables (Fifth Edition).pdf ANSI UL 1569-2018 UL Standard for Safety Metal-Clad Cables (Fifth Edition).pdf
  • ANSI UL 1574-2004 UL Standard for Safety Track Lighting Systems (Third Edition Reprint with Revisions Through and Including July 12 2016)《轨道照明装置》.pdf ANSI UL 1574-2004 UL Standard for Safety Track Lighting Systems (Third Edition Reprint with Revisions Through and Including July 12 2016)《轨道照明装置》.pdf
  • 相关搜索

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

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