【计算机类职业资格】全国计算机等级考试三级信息管理技术机试真题2007年4月及答案解析.doc

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

1、全国计算机等级考试三级信息管理技术机试真题 2007年 4月及答案解析(总分:100.00,做题时间:90 分钟)一、上机题(总题数:1,分数:100.00)1.下列程序的功能是:设 A,B,C 为三个不为零的正整数,计算并输出下列不定方程组解的个数 cnt以及满足此条件的所有 A,B,C 之和 sum。不定方程组为:A+B+C=13A-C=5请编写函数 countValue()实现程序的要求,最后调用函数 writeDat()把结果 cnt和 sum输出到文件out.dat中。试题源程序#includestdiohvoid WriteDat();int cnt,sum:void countv

2、alue()void main()cnt=sum=0:countvalue();printf(“cnt=%d/n“,cnt);printf(“sum=%d/n“,sum);WriteDat();void WriteDat()FILE*fp;fp=fopen(“outdat“,“w“);fprintf(fp,“%d/n%d/n“,cnt,sum);fclose(fp);(分数:100.00)_全国计算机等级考试三级信息管理技术机试真题 2007年 4月答案解析(总分:100.00,做题时间:90 分钟)一、上机题(总题数:1,分数:100.00)1.下列程序的功能是:设 A,B,C 为三个不为零

3、的正整数,计算并输出下列不定方程组解的个数 cnt以及满足此条件的所有 A,B,C 之和 sum。不定方程组为:A+B+C=13A-C=5请编写函数 countValue()实现程序的要求,最后调用函数 writeDat()把结果 cnt和 sum输出到文件out.dat中。试题源程序#includestdiohvoid WriteDat();int cnt,sum:void countvalue()void main()cnt=sum=0:countvalue();printf(“cnt=%d/n“,cnt);printf(“sum=%d/n“,sum);WriteDat();void Wr

4、iteDat()FILE*fp;fp=fopen(“outdat“,“w“);fprintf(fp,“%d/n%d/n“,cnt,sum);fclose(fp);(分数:100.00)_正确答案:(void countvalue()int a:for(a=6;a13;a+)if(18-2*a0)cnt+:sum+=13:)解析:解析 本题主要考查的是解方程问题。本题的难点和解题的关键在于分析题目,对于给定的方程组变形得到 B=18-2*A,C=A-50,因此 A从 6开始可能满足方程,而由第一个方程知道 A不可能大于13,因此我们可以用 for循环内嵌 if语句来解出方程,如果 B0,那么此时的 A就满足该方程组,cnt增 1,并且由第一个方程知道有一组解 sum的值增加 13。

展开阅读全文
相关资源
猜你喜欢
  • BS EN ISO 8785-1999 Geometrical product specification (GPS) - Surface imperfections - Terms definitions and parameters《几何产品规范(GPS) 表面缺陷 术语、定义和参数》.pdf BS EN ISO 8785-1999 Geometrical product specification (GPS) - Surface imperfections - Terms definitions and parameters《几何产品规范(GPS) 表面缺陷 术语、定义和参数》.pdf
  • BS EN ISO 8795-2002 Plastics piping systems for the transport of water intended for human consumption Migration assessment Determination of migration values of plastics pipes and f.pdf BS EN ISO 8795-2002 Plastics piping systems for the transport of water intended for human consumption Migration assessment Determination of migration values of plastics pipes and f.pdf
  • BS EN ISO 8799-2009 Surface active agents - Sulfated ethoxylated alcohols and alkylphenols - Determination of content of unsulfated matter《表面活性剂 硫酸化的乙氧基化醇和烷基酚 未硫酸化物质的含量测定》.pdf BS EN ISO 8799-2009 Surface active agents - Sulfated ethoxylated alcohols and alkylphenols - Determination of content of unsulfated matter《表面活性剂 硫酸化的乙氧基化醇和烷基酚 未硫酸化物质的含量测定》.pdf
  • BS EN ISO 8826-1-1995 Technical drawings - Roller bearings - General simplified representation《技术制图 滚柱轴承 通用简化画法》.pdf BS EN ISO 8826-1-1995 Technical drawings - Roller bearings - General simplified representation《技术制图 滚柱轴承 通用简化画法》.pdf
  • BS EN ISO 8826-2-1997 Technical drawings Roller bearings Detailed simplified representation《技术制图 滚柱轴承 详细简化表示法》.pdf BS EN ISO 8826-2-1997 Technical drawings Roller bearings Detailed simplified representation《技术制图 滚柱轴承 详细简化表示法》.pdf
  • BS EN ISO 8836-2014 Suction catheters for use in the respiratory tract《用于呼吸道的抽吸导管》.pdf BS EN ISO 8836-2014 Suction catheters for use in the respiratory tract《用于呼吸道的抽吸导管》.pdf
  • BS EN ISO 8849-2003 Small craft - Electrically operated direct-current bilge-pumps《小艇 电动直流舱底泵》.pdf BS EN ISO 8849-2003 Small craft - Electrically operated direct-current bilge-pumps《小艇 电动直流舱底泵》.pdf
  • BS EN ISO 8861-1998 Shipbuilding - Engine-room ventilation in diesel-engined ships - Design requirements and basis of calculations《造船 柴油机船舶发动机室的通风 设计要求和计算依据》.pdf BS EN ISO 8861-1998 Shipbuilding - Engine-room ventilation in diesel-engined ships - Design requirements and basis of calculations《造船 柴油机船舶发动机室的通风 设计要求和计算依据》.pdf
  • BS EN ISO 8871-1-2004 Elastomeric parts for parenterals and for devices for pharmaceutical use - Extractables in aqueous autoclavates《非肠道及制药设备用弹性件 水蒸压器中的萃取物》.pdf BS EN ISO 8871-1-2004 Elastomeric parts for parenterals and for devices for pharmaceutical use - Extractables in aqueous autoclavates《非肠道及制药设备用弹性件 水蒸压器中的萃取物》.pdf
  • 相关搜索

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

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