【计算机类职业资格】国家三级(网络技术)机试-试卷103及答案解析.doc

上传人:tireattitude366 文档编号:1331035 上传时间:2019-10-17 格式:DOC 页数:2 大小:30KB
下载 相关 举报
【计算机类职业资格】国家三级(网络技术)机试-试卷103及答案解析.doc_第1页
第1页 / 共2页
【计算机类职业资格】国家三级(网络技术)机试-试卷103及答案解析.doc_第2页
第2页 / 共2页
亲,该文档总共2页,全部预览完了,如果喜欢就下载吧!
资源描述

1、国家三级(网络技术)机试-试卷 103 及答案解析(总分:2.00,做题时间:90 分钟)一、程序设计题(总题数:1,分数:2.00)1. (分数:2.00)_国家三级(网络技术)机试-试卷 103 答案解析(总分:2.00,做题时间:90 分钟)一、程序设计题(总题数:1,分数:2.00)1. (分数:2.00)_正确答案:(正确答案: )解析:解析:定义整型循环变量 i、j,表示各位数字之和的长整型变量 he 以及存储一个四位数的字符数组 num5。 循环变量 i 从 0 开始,依次递增到 4,对字符数组 num5的每个元素赋初值 0。 循环变量 i 从 0 开始,依次递增到 MAXNUM

2、1,对每个数组元素 xxi进行判断,如果 xxi的值非零,则变量torNum 加 1,退出循环时,totNum 的值就是文件 in.dat 中存有的四位正整数的个数。 循环变量 i 从0 开始,依次递增到 totNum-1,对于每个数组元素 xxi调用库函数 sprintf()以 4 个字符宽度形式输出到字符数组 num 中,用字符数组 num 中的每个元素减去 0 的 ASCII 码 48,就分别得到 xxi嘲这个四位数每位上的数字,并把这四个数字相加赋给变量 j。再对变量 j 对 2 求余数进行判断其值是否等于 0,如果等于 0,则说明 j 是偶数,变量 totCnt 加 1,并把 xxi的值累加到变量 he。 退出循环后,把变量 he的类型转换成双精度型再除以 totCnt 得到符合条件的数的算术平均值 totPjz。

展开阅读全文
相关资源
猜你喜欢
  • DS IEC 767-1986 Helical-scan video tape cassette system using 12 65 mm (0 5 in) magnetic tape on type beta format《B型12 65mm(0 5in)磁带螺旋扫描盒式磁带录像系统》.pdf DS IEC 767-1986 Helical-scan video tape cassette system using 12 65 mm (0 5 in) magnetic tape on type beta format《B型12 65mm(0 5in)磁带螺旋扫描盒式磁带录像系统》.pdf
  • DS IEC 794-1 Till 1-1991 Optical fibre cables Part 1 Generic specification《光缆 第1部分 通用规范》.pdf DS IEC 794-1 Till 1-1991 Optical fibre cables Part 1 Generic specification《光缆 第1部分 通用规范》.pdf
  • DS IEC 794-1-1992 Optical fibre cables Part 1 Generic specification《光缆 第1部分 通用规范》.pdf DS IEC 794-1-1992 Optical fibre cables Part 1 Generic specification《光缆 第1部分 通用规范》.pdf
  • DS IEC 795-1987 Test method for evaluating thermal endurance of flexible sheet materials using the wrapped tube method《用缠绕管法评定柔软片材耐热性的试验方法》.pdf DS IEC 795-1987 Test method for evaluating thermal endurance of flexible sheet materials using the wrapped tube method《用缠绕管法评定柔软片材耐热性的试验方法》.pdf
  • DS IEC 839-2-7-1995 Alarm systems - Part 2 Requirements for intruder alarm systems - Section 7 Passive glass-break detectors for use in buildings《警报系统 第2部分:闯入警报系统的要求 第7节:建筑物内用无源玻璃破.pdf DS IEC 839-2-7-1995 Alarm systems - Part 2 Requirements for intruder alarm systems - Section 7 Passive glass-break detectors for use in buildings《警报系统 第2部分:闯入警报系统的要求 第7节:建筑物内用无源玻璃破.pdf
  • DS IEC 885-1-1987 Electrical test methods for electric cables Part 1 Electrical tests for cables cords and wires for voltages up to and including 450 750 V《电缆的电气试验方法 第1部分 电压在450 75.pdf DS IEC 885-1-1987 Electrical test methods for electric cables Part 1 Electrical tests for cables cords and wires for voltages up to and including 450 750 V《电缆的电气试验方法 第1部分 电压在450 75.pdf
  • DS IEC 949-1990 Calculation of thermally permissible short-circuit currents taking into account non-adiabatic heating effects《在考虑非绝缘加热效应条件下的热容许短路电流的计算》.pdf DS IEC 949-1990 Calculation of thermally permissible short-circuit currents taking into account non-adiabatic heating effects《在考虑非绝缘加热效应条件下的热容许短路电流的计算》.pdf
  • DS IEC TR 1200-53-1995 Electrical installation guide - Part 53 Selection and erection of electrical equipment - Switchgear and controlgear《电气设备安装指南 第53部分:电气设备的选择和安装 开关设备和控制设备》.pdf DS IEC TR 1200-53-1995 Electrical installation guide - Part 53 Selection and erection of electrical equipment - Switchgear and controlgear《电气设备安装指南 第53部分:电气设备的选择和安装 开关设备和控制设备》.pdf
  • DS INF 100-1994 Information and documentation-Indexing guidelines-Methods for analysing documents determining their subjects and selecting indexing terms《信息与文件 索引指南 分析文件,确定其主题并选择索引.pdf DS INF 100-1994 Information and documentation-Indexing guidelines-Methods for analysing documents determining their subjects and selecting indexing terms《信息与文件 索引指南 分析文件,确定其主题并选择索引.pdf
  • 相关搜索

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

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