【计算机类职业资格】三级信息管理技术机试-163及答案解析.doc

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

1、三级信息管理技术机试-163 及答案解析(总分:100.00,做题时间:90 分钟)一、上机题(总题数:1,分数:100.00)1.下列程序的功能是:计算出自然数 SIX 和 NINE,它们满足的条件是 SIX+SIX+SIX=NINE+NINE 的个数cnt,以及满足此条件的所有 SIX 与 NINE 的和 sum。请编写函数 countValue()实现程序要求,最后调用函数 writeDAT()把结果 cnt 和 sum 输出到文件 OUT51.DAT 中。其中的 S,I,X,N,I,N,E 各代表一个十进制数。注意:部分源程序已给出。请勿改动主函数 main()和写函数 writeDA

2、T()的内容。#includestdio. hint cnt, sum;void countValue ()void main ()cnt=sum=0;countValue ();printf ( “满足条件的个数=%d/n“, cnt);printf (“满足条件所有的 SIX 与 NINE 的和=%d/n“, sum);writeDAT ();writeDAT ()FILE *fp;fiD=foDen (“OUT51. DAT“, “w“ );fprintf (fp, “%d/n%d/n“, cnt, sum);fclose (fp);(分数:100.00)_三级信息管理技术机试-163

3、答案解析(总分:100.00,做题时间:90 分钟)一、上机题(总题数:1,分数:100.00)1.下列程序的功能是:计算出自然数 SIX 和 NINE,它们满足的条件是 SIX+SIX+SIX=NINE+NINE 的个数cnt,以及满足此条件的所有 SIX 与 NINE 的和 sum。请编写函数 countValue()实现程序要求,最后调用函数 writeDAT()把结果 cnt 和 sum 输出到文件 OUT51.DAT 中。其中的 S,I,X,N,I,N,E 各代表一个十进制数。注意:部分源程序已给出。请勿改动主函数 main()和写函数 writeDAT()的内容。#includes

4、tdio. hint cnt, sum;void countValue ()void main ()cnt=sum=0;countValue ();printf ( “满足条件的个数=%d/n“, cnt);printf (“满足条件所有的 SIX 与 NINE 的和=%d/n“, sum);writeDAT ();writeDAT ()FILE *fp;fiD=foDen (“OUT51. DAT“, “w“ );fprintf (fp, “%d/n%d/n“, cnt, sum);fclose (fp);(分数:100.00)_正确答案:(void countValue ()int i=1

5、00;while (1)if(3*i%2=0 /*统计满足条件的数的个数*/sum+= i+3*i/2; /*求满足此条件的所有 SIX 与 NINE 的和*/i+;else i+; /*如果不满足条件,则取下一个数*/if(i999 3*i/29999)break; /*当 SIX 不为 3 位数或所得的数不为四位数时,退出循环*/解析 本题考查的知识点如下:(1)循环与判断的嵌套使用。(2)多条件的布尔运算。(3)“%”与“/”运算符的使用。根据题意,求的是满足 3 位数乘以 3 等于 4 位数乘以 2 的数的个数。我们可以使用循环结构对所有的 3 位数进行判断,若某个 3 位数乘以 3 整除 2 所得的数是 4 位整数,则这个 3 位数是满足条件的数。当判断的数不再是 3 位数或者进行处理后所得的数大于 9999,则要退出循环。在这里,还要注意判断结构中,各条件之间是用“与”运算还是用“或”运算。)解析:

展开阅读全文
相关资源
猜你喜欢
  • ASTM C1702-2014 Standard Test Method for Measurement of Heat of Hydration of Hydraulic Cementitious Materials Using Isothermal Conduction Calorimetry《利用等温量热传导测量水硬性胶凝材料的水化热的标准试验方法》.pdf ASTM C1702-2014 Standard Test Method for Measurement of Heat of Hydration of Hydraulic Cementitious Materials Using Isothermal Conduction Calorimetry《利用等温量热传导测量水硬性胶凝材料的水化热的标准试验方法》.pdf
  • ASTM C1702-2015 Standard Test Method for Measurement of Heat of Hydration of Hydraulic Cementitious Materials Using Isothermal Conduction Calorimetry《采用等温传导量热法测量水硬性胶凝材料的水化热的标准试验方法》.pdf ASTM C1702-2015 Standard Test Method for Measurement of Heat of Hydration of Hydraulic Cementitious Materials Using Isothermal Conduction Calorimetry《采用等温传导量热法测量水硬性胶凝材料的水化热的标准试验方法》.pdf
  • ASTM C1702-2015a Standard Test Method for Measurement of Heat of Hydration of Hydraulic Cementitious Materials Using Isothermal Conduction Calorimetry《采用等温传导量热法测量水硬性胶凝材料的水化热的标准试验方法.pdf ASTM C1702-2015a Standard Test Method for Measurement of Heat of Hydration of Hydraulic Cementitious Materials Using Isothermal Conduction Calorimetry《采用等温传导量热法测量水硬性胶凝材料的水化热的标准试验方法.pdf
  • ASTM C1702-2015b Standard Test Method for Measurement of Heat of Hydration of Hydraulic Cementitious Materials Using Isothermal Conduction Calorimetry《采用等温传导量热法测量水硬性胶凝材料的水化热的标准试验方法.pdf ASTM C1702-2015b Standard Test Method for Measurement of Heat of Hydration of Hydraulic Cementitious Materials Using Isothermal Conduction Calorimetry《采用等温传导量热法测量水硬性胶凝材料的水化热的标准试验方法.pdf
  • ASTM C1702-2017 Standard Test Method for Measurement of Heat of Hydration of Hydraulic Cementitious Materials Using Isothermal Conduction Calorimetry《利用等温量热传导测量水硬性胶凝材料的水化热的标准试验方法》.pdf ASTM C1702-2017 Standard Test Method for Measurement of Heat of Hydration of Hydraulic Cementitious Materials Using Isothermal Conduction Calorimetry《利用等温量热传导测量水硬性胶凝材料的水化热的标准试验方法》.pdf
  • ASTM C1703-2008 Standard Practice for Sampling of Gaseous Uranium Hexafluoride《气态六氟化铀采样的标准方法》.pdf ASTM C1703-2008 Standard Practice for Sampling of Gaseous Uranium Hexafluoride《气态六氟化铀采样的标准方法》.pdf
  • ASTM C1703-2008(2013) Standard Practice for Sampling of Gaseous Uranium Hexafluoride《气态六氟化铀采样的标准实施规程》.pdf ASTM C1703-2008(2013) Standard Practice for Sampling of Gaseous Uranium Hexafluoride《气态六氟化铀采样的标准实施规程》.pdf
  • ASTM C1703-2018 Standard Practice for Sampling of Gaseous Uranium Hexafluoride for Enrichment《浓缩用气态六氟化铀取样的标准实施规程》.pdf ASTM C1703-2018 Standard Practice for Sampling of Gaseous Uranium Hexafluoride for Enrichment《浓缩用气态六氟化铀取样的标准实施规程》.pdf
  • ASTM C1704 C1704M-2009 Standard Test Method for Sampling and Testing Structural Cementitious Panels.pdf ASTM C1704 C1704M-2009 Standard Test Method for Sampling and Testing Structural Cementitious Panels.pdf
  • 相关搜索

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

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