【计算机类职业资格】二级C语言机试57及答案解析.doc

上传人:registerpick115 文档编号:1325856 上传时间:2019-10-17 格式:DOC 页数:3 大小:33KB
下载 相关 举报
【计算机类职业资格】二级C语言机试57及答案解析.doc_第1页
第1页 / 共3页
【计算机类职业资格】二级C语言机试57及答案解析.doc_第2页
第2页 / 共3页
【计算机类职业资格】二级C语言机试57及答案解析.doc_第3页
第3页 / 共3页
亲,该文档总共3页,全部预览完了,如果喜欢就下载吧!
资源描述

1、二级 C 语言机试 57 及答案解析(总分:100.00,做题时间:90 分钟)一、B填空题/B(总题数:1,分数:30.00)1.请补充函数 fun(),该函数的功能是:按行统计 NN 维矩阵元素中的最大值(均为整数),并把这些值按从小到大的顺序保存在数组 b 中。矩阵的维数在主函数中输入,并赋予随机数。 注意:部分源程序给出如下。 请勿改动主函数 main 和其他函数中的任何内容,仅在函数 fun 的横线上填入所编写的若干表达式或语句。 试题程序: #includestdioh #includeconioh #includestdlibh #define N 20 void fun(U 【

2、1】 /U) int i j; int t; for(i=0;in;i+) for(j=0;jn;j+) if(U 【2】 /U) bi=aij; for(i=0;in;i+) for(j=0;in;j+) if(U 【3】 /U) t=bi; bi=bj; bj=t; main() int aNN; int bN; int n; int i,j; clrscr(); printf(“*Input the dimension of array N*/n“); scanf(“%d“,im;i+) /*找出大于 1小于整数 m 的素数*/ t=l; for(j=2;ji;j+) if(i%j=0) t=0; break; if(t=1) xxn+=i; *k=n; /*返回素数的个数*/ 解析 这道题是考查一个数是不是素数,只要掌握了判断素数的方法,问题便能顺利解决,请以此题为例,掌握判断素数的方法。

展开阅读全文
相关资源
猜你喜欢
  • DIN EN ISO 3211-2010 Anodizing of aluminium and its alloys - Assessment of resistance of anodic oxidation coatings to cracking by deformation (ISO 3211 2010) German version EN ISO .pdf DIN EN ISO 3211-2010 Anodizing of aluminium and its alloys - Assessment of resistance of anodic oxidation coatings to cracking by deformation (ISO 3211 2010) German version EN ISO .pdf
  • DIN EN ISO 3218-2014 Essential oils - Principles of nomenclature (ISO 3218 2014) German version EN ISO 3218 2014《精油 命名原则 (ISO 3218-2014) 德文版本EN ISO 3218-2014》.pdf DIN EN ISO 3218-2014 Essential oils - Principles of nomenclature (ISO 3218 2014) German version EN ISO 3218 2014《精油 命名原则 (ISO 3218-2014) 德文版本EN ISO 3218-2014》.pdf
  • DIN EN ISO 3219-1994 Plastics - Polymers resins in the liquid state or as emulsions or dispersions - Determination of viscosity using a rotational viscometer with defined shear rat.pdf DIN EN ISO 3219-1994 Plastics - Polymers resins in the liquid state or as emulsions or dispersions - Determination of viscosity using a rotational viscometer with defined shear rat.pdf
  • DIN EN ISO 3231-1998 Paints and varnishes - Determination of resistance to humid atmospheres containing sulfur dioxide (ISO 3231 1993) German version EN ISO 3231 1997《油漆和清漆 耐含二氧化硫潮.pdf DIN EN ISO 3231-1998 Paints and varnishes - Determination of resistance to humid atmospheres containing sulfur dioxide (ISO 3231 1993) German version EN ISO 3231 1997《油漆和清漆 耐含二氧化硫潮.pdf
  • DIN EN ISO 3233-1-2013 Paints and varnishes - Determination of percentage volume of non-volatile matter - Part 1 Method using a coated test panel to determine non-volatile matter a.pdf DIN EN ISO 3233-1-2013 Paints and varnishes - Determination of percentage volume of non-volatile matter - Part 1 Method using a coated test panel to determine non-volatile matter a.pdf
  • DIN EN ISO 3233-2-2014 Paints and varnishes - Determination of the percentage volume of non-volatile matter - Part 2 Method using the determination of non-volatile-matter content i.pdf DIN EN ISO 3233-2-2014 Paints and varnishes - Determination of the percentage volume of non-volatile matter - Part 2 Method using the determination of non-volatile-matter content i.pdf
  • DIN EN ISO 3233-3-2015 Paints and varnishes - Determination of the percentage volume of non-volatile matter - Part 3 Determination by calculation from the non-volatile-matter conte.pdf DIN EN ISO 3233-3-2015 Paints and varnishes - Determination of the percentage volume of non-volatile matter - Part 3 Determination by calculation from the non-volatile-matter conte.pdf
  • DIN EN ISO 3248-2016 Paints and varnishes - Determination of the effect of heat (ISO 3248 2016) German version EN ISO 3248 2016《色漆和清漆 热效应的测定(ISO 3248-2016) 德文版本EN ISO 3248-2016》.pdf DIN EN ISO 3248-2016 Paints and varnishes - Determination of the effect of heat (ISO 3248 2016) German version EN ISO 3248 2016《色漆和清漆 热效应的测定(ISO 3248-2016) 德文版本EN ISO 3248-2016》.pdf
  • DIN EN ISO 3251-2008 Paints varnishes and plastics - Determination of non-volatile-matter content (ISO 3251 2008) German version EN ISO 3251 2008《涂料、清漆和塑料 非挥发物质含量的测定》.pdf DIN EN ISO 3251-2008 Paints varnishes and plastics - Determination of non-volatile-matter content (ISO 3251 2008) German version EN ISO 3251 2008《涂料、清漆和塑料 非挥发物质含量的测定》.pdf
  • 相关搜索

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

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