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

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

1、计算机三级数据库技术(上机操作)机试模拟试卷 71及答案与解析 一、程序设计题 1 编写函数 jsValue(int t),其功能是:求 Fibonacci数列中最接近 t的数。结果由函数返回。其中 Fibonacci数列 FCn)的定义为: F(0)=0, F(1)=1 F(n)=F(n一 1)+F(n一 2)(n2) 最后调用函数 writeDat()读取 10个数据 t,分别得出结果并把结果输出到文件out dat中。 例如:当 t=1000时,函数值为 987。 【试题程序】 #include void writeDat(); int jsValue(int t) main() int

2、 n; n=1000: printf(“n= d, f= d n” n, jsValue(n); writeDat(); void writeDat() FILE*in, *out; int i, n, s; in=fopen(“in dat”, “r”); out=fopen(“out dat”, “W”); for(i=0; i10; i+) fscanf(in, “ d”, 8Ln); s=jsValue(n); fprintf(out, “ d n”, s); fclose(jn); fclose(out); 计算机三级数据库技术(上机操作)机试模拟试卷 71答案与解析 一、程序设计题 1 【正确答案】 int jsValll(2(int t) int fl=0, f2=1, fn; *定义变量 * fn=f1+f2; *初始化变量 * while(fn=t) *迭代循环 * f1=f2; f2=fn; fn=f1+f2; if(fnttf2) return fn; *返回结果 * else return f2;

展开阅读全文
相关资源
猜你喜欢
  • ASTM A913 A913M-2014a Standard Specification for High-Strength Low-Alloy Steel Shapes of Structural Quality Produced by Quenching and Self-Tempering Process &40 QST&41 《用淬火和自回火工艺制作.pdf ASTM A913 A913M-2014a Standard Specification for High-Strength Low-Alloy Steel Shapes of Structural Quality Produced by Quenching and Self-Tempering Process &40 QST&41 《用淬火和自回火工艺制作.pdf
  • ASTM A913 A913M-2015 Standard Specification for High-Strength Low-Alloy Steel Shapes of Structural Quality Produced by Quenching and Self-Tempering Process (QST)《用淬火和自回火工艺制作的高强度低合金.pdf ASTM A913 A913M-2015 Standard Specification for High-Strength Low-Alloy Steel Shapes of Structural Quality Produced by Quenching and Self-Tempering Process (QST)《用淬火和自回火工艺制作的高强度低合金.pdf
  • ASTM A914 A914M-1992(2005) Standard Specification for Steel Bars Subject to Restricted End-Quench Hardenability Requirements《符合限制的顶端淬火要求的钢棒的标准规范》.pdf ASTM A914 A914M-1992(2005) Standard Specification for Steel Bars Subject to Restricted End-Quench Hardenability Requirements《符合限制的顶端淬火要求的钢棒的标准规范》.pdf
  • ASTM A914 A914M-1992(2011) Standard Specification for Steel Bars Subject to Restricted End-Quench Hardenability Requirements《对末端淬火淬透性有限制要求的钢棒材标准规范》.pdf ASTM A914 A914M-1992(2011) Standard Specification for Steel Bars Subject to Restricted End-Quench Hardenability Requirements《对末端淬火淬透性有限制要求的钢棒材标准规范》.pdf
  • ASTM A914 A914M-2016 Standard Specification for Steel Bars Subject to Restricted End-Quench Hardenability Requirements《符合限制的顶端淬火要求的钢棒的标准规格》.pdf ASTM A914 A914M-2016 Standard Specification for Steel Bars Subject to Restricted End-Quench Hardenability Requirements《符合限制的顶端淬火要求的钢棒的标准规格》.pdf
  • ASTM A915 A915M-1993(2003) Standard Specification for Steel Castings Carbon and Alloy Chemical Requirements Similar to Standard Wrought Grades.pdf ASTM A915 A915M-1993(2003) Standard Specification for Steel Castings Carbon and Alloy Chemical Requirements Similar to Standard Wrought Grades.pdf
  • ASTM A915 A915M-2008 Standard Specification for Steel Castings Carbon and Alloy Chemical Requirements Similar to Standard Wrought Grades《化学要求同锻件类似的碳素钢和合金钢的标准规范》.pdf ASTM A915 A915M-2008 Standard Specification for Steel Castings Carbon and Alloy Chemical Requirements Similar to Standard Wrought Grades《化学要求同锻件类似的碳素钢和合金钢的标准规范》.pdf
  • ASTM A915 A915M-2008(2013) Standard Specification for Steel Castings Carbon and Alloy Chemical Requirements Similar to Standard Wrought Grades《化学要求同锻件类似的碳素钢和合金钢标准规格》.pdf ASTM A915 A915M-2008(2013) Standard Specification for Steel Castings Carbon and Alloy Chemical Requirements Similar to Standard Wrought Grades《化学要求同锻件类似的碳素钢和合金钢标准规格》.pdf
  • ASTM A915 A915M-2008(2018) Standard Specification for Steel Castings Carbon and Alloy Chemical Requirements Similar to Standard Wrought Grades.pdf ASTM A915 A915M-2008(2018) Standard Specification for Steel Castings Carbon and Alloy Chemical Requirements Similar to Standard Wrought Grades.pdf
  • 相关搜索

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

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