[计算机类试卷]国家三级(网络技术)机试模拟试卷301及答案与解析.doc

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

1、国家三级(网络技术)机试模拟试卷 301及答案与解析 一、程序设计题 1 调用函数 rwdata(),从 in dat文件中读取 10组数据 (m和 k),并嵌套调用primenum函数分别得出 array数组。请编写 primenum(int m, int k, int array),该函数的功能是;将紧靠 m的 k个素数存人数组 array并在屏幕上显示。最后把结果输出到文件 out dat中。 例如,若输入 3 9则对应输出 5 7 11 1 3 1 7 1 9 23 29 31。 注意;部分程序已经给出,请勿改动主函 数 main()和输出数据函数 rwdata()的内容。 试题程序;

2、 #include #include void rwdata(); void primenum(int m, int k, int array) main() int m, n, array1000; printf(“ Please enter two integers; “); scanf(“ d d“, &m, &n); primenum(m, n, array); for(m=0; mhalf) arraun=value; n+; if(n=k) break; value+; 【试题解析】 本题主要考查素数判断的问题,本程序的算法是; 1先定义变量value,将 m之后的数逐个赋值给该变量; 2若此数不能被 2 value 2整除,则为素数,将值赋给 arrayn,然后 n+;

展开阅读全文
相关资源
猜你喜欢
  • ASD-STAN PREN 4830-004-2014 Aerospace series Connectors optical rectangular modular operating temperature 125 for EN 4639-10X contacts Part 004 Extraction tool Product standard.pdf ASD-STAN PREN 4830-004-2014 Aerospace series Connectors optical rectangular modular operating temperature 125 for EN 4639-10X contacts Part 004 Extraction tool Product standard.pdf
  • ASD-STAN PREN 4832-2017 Aerospace series - Adaptor Pipe coupling 24 one up to 35 000 kPa (5 080 psi) Ringlocked fitting and Ring-locked fitting-reducer - Inch Series - Technical sp.pdf ASD-STAN PREN 4832-2017 Aerospace series - Adaptor Pipe coupling 24 one up to 35 000 kPa (5 080 psi) Ringlocked fitting and Ring-locked fitting-reducer - Inch Series - Technical sp.pdf
  • ASD-STAN PREN 4833-2017 Aerospace series - Pipe coupling 24 one up to 35 000 kPa (5 080 psi) Ring locked fitting - Flareless End - Inch Series - Extra Fine Thread Pitch (Edition P1.pdf ASD-STAN PREN 4833-2017 Aerospace series - Pipe coupling 24 one up to 35 000 kPa (5 080 psi) Ring locked fitting - Flareless End - Inch Series - Extra Fine Thread Pitch (Edition P1.pdf
  • ASD-STAN PREN 4834-2017 Aerospace series - Adaptor Pipe coupling 24 one up to 35 000 kPa (5 080 psi) Port for Ring locked fitting - Inch Series - Geometric configuration (Edition P.pdf ASD-STAN PREN 4834-2017 Aerospace series - Adaptor Pipe coupling 24 one up to 35 000 kPa (5 080 psi) Port for Ring locked fitting - Inch Series - Geometric configuration (Edition P.pdf
  • ASD-STAN PREN 4835-2017 Aerospace series - Installation and removal requirements for Ring locked fitting and reducer 24 one up to 35 000 kPa (5 080 psi) - Inch Series (Edition P1).pdf ASD-STAN PREN 4835-2017 Aerospace series - Installation and removal requirements for Ring locked fitting and reducer 24 one up to 35 000 kPa (5 080 psi) - Inch Series (Edition P1).pdf
  • ASD-STAN PREN 4836-2017 Aerospace series - Adaptor Pipe coupling 24 ne up to 35 000 kPa (5 080 psi) Ringlocked fitting Reducer-Flareless End - Inch Series - Extra Fine Thread Pitch.pdf ASD-STAN PREN 4836-2017 Aerospace series - Adaptor Pipe coupling 24 ne up to 35 000 kPa (5 080 psi) Ringlocked fitting Reducer-Flareless End - Inch Series - Extra Fine Thread Pitch.pdf
  • ASD-STAN PREN 4838-001-2016 Aerospace series Arc Fault Circuit breakers single-pole temperature compensated rated current 3 A to 25 A 115 V a c 400 Hz constant frequency Part 001 T.pdf ASD-STAN PREN 4838-001-2016 Aerospace series Arc Fault Circuit breakers single-pole temperature compensated rated current 3 A to 25 A 115 V a c 400 Hz constant frequency Part 001 T.pdf
  • ASD-STAN PREN 4838-004-2016 Aerospace series Arc Fault Circuit breakers single-pole temperature compensated rated current 3 A to 25 A 115 V a c 400 Hz constant frequency Part 004 W.pdf ASD-STAN PREN 4838-004-2016 Aerospace series Arc Fault Circuit breakers single-pole temperature compensated rated current 3 A to 25 A 115 V a c 400 Hz constant frequency Part 004 W.pdf
  • ASD-STAN PREN 4838-005-2016 Aerospace series Arc Fault Circuit breakers single-pole temperature compensated rated current 3 A to 25 A 115 V a c 400 Hz constant frequency Part 005 W.pdf ASD-STAN PREN 4838-005-2016 Aerospace series Arc Fault Circuit breakers single-pole temperature compensated rated current 3 A to 25 A 115 V a c 400 Hz constant frequency Part 005 W.pdf
  • 相关搜索

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

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