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

上传人:fuellot230 文档编号:1325675 上传时间:2019-10-17 格式:DOC 页数:7 大小:32.50KB
下载 相关 举报
【计算机类职业资格】二级C语言机试-174及答案解析.doc_第1页
第1页 / 共7页
【计算机类职业资格】二级C语言机试-174及答案解析.doc_第2页
第2页 / 共7页
【计算机类职业资格】二级C语言机试-174及答案解析.doc_第3页
第3页 / 共7页
【计算机类职业资格】二级C语言机试-174及答案解析.doc_第4页
第4页 / 共7页
【计算机类职业资格】二级C语言机试-174及答案解析.doc_第5页
第5页 / 共7页
点击查看更多>>
资源描述

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

2、t;for(i=0;in;i+)for(j=0;jn;j+)if( 【2】 )bi=aij;for(i=0;in;i+)for(j=0;in;j+)if( 【3】 )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 10250-4 Berichtigung 1-2008 Open die steel forgings for general engineering purposes - Part 4 Stainless steels German version EN 10250-4 1999 Corrigendum to DIN EN 10250-4 2.pdf DIN EN 10250-4 Berichtigung 1-2008 Open die steel forgings for general engineering purposes - Part 4 Stainless steels German version EN 10250-4 1999 Corrigendum to DIN EN 10250-4 2.pdf
  • DIN EN 10250-4-2000 Open die steel forgings for general engineering purposes - Part 4 Stainless steels German version EN 10250-4 1999《通用工程用开式模锻钢件 第4部分 不锈钢》.pdf DIN EN 10250-4-2000 Open die steel forgings for general engineering purposes - Part 4 Stainless steels German version EN 10250-4 1999《通用工程用开式模锻钢件 第4部分 不锈钢》.pdf
  • DIN EN 10251-2015 Magnetic materials - Methods of determination of the geometrical characteristics of electrical steel sheet and strip German version EN 10251 2015《磁性材料 测定电工钢片和电工钢带.pdf DIN EN 10251-2015 Magnetic materials - Methods of determination of the geometrical characteristics of electrical steel sheet and strip German version EN 10251 2015《磁性材料 测定电工钢片和电工钢带.pdf
  • DIN EN 10252-1997 Magnetic materials - Methods of measurement of magnetic properties of electrical steel sheet and strip at medium frequencies German version EN 10252 1997《磁性材料 中频电.pdf DIN EN 10252-1997 Magnetic materials - Methods of measurement of magnetic properties of electrical steel sheet and strip at medium frequencies German version EN 10252 1997《磁性材料 中频电.pdf
  • DIN EN 10253-1-1999 Butt-welding pipe fittings - Part 1 Wrought carbon steel for general use and without specific inspection requirements German version EN 10253-1 1999《对焊管管件 第1部分 .pdf DIN EN 10253-1-1999 Butt-welding pipe fittings - Part 1 Wrought carbon steel for general use and without specific inspection requirements German version EN 10253-1 1999《对焊管管件 第1部分 .pdf
  • DIN EN 10253-2-2008 Butt-welding pipe fittings - Part 2 Non alloy and ferritic alloy steels with specific inspection requirements English version of DIN EN 10253-2 2008-04《对焊管管件 第2.pdf DIN EN 10253-2-2008 Butt-welding pipe fittings - Part 2 Non alloy and ferritic alloy steels with specific inspection requirements English version of DIN EN 10253-2 2008-04《对焊管管件 第2.pdf
  • DIN EN 10253-3 Berichtigung 1-2013 de 6992 Butt-welding pipe fittings - Part 3 Wrought austenitic and austenitic-ferritic (duplex) stainless steels without specific inspection requ.pdf DIN EN 10253-3 Berichtigung 1-2013 de 6992 Butt-welding pipe fittings - Part 3 Wrought austenitic and austenitic-ferritic (duplex) stainless steels without specific inspection requ.pdf
  • DIN EN 10253-3-2009 Butt-welding pipe fittings - Part 3 Wrought austenitic and austenitic-ferritic (duplex) stainless steels without specific inspection requirements English versio.pdf DIN EN 10253-3-2009 Butt-welding pipe fittings - Part 3 Wrought austenitic and austenitic-ferritic (duplex) stainless steels without specific inspection requirements English versio.pdf
  • DIN EN 10253-4 Berichtigung 1-2009 en 9329 Butt-welding pipe fittings - Part 4 Wrought austenitic and austenitic-ferritic (duplex) stainless steels with specific inspection require.pdf DIN EN 10253-4 Berichtigung 1-2009 en 9329 Butt-welding pipe fittings - Part 4 Wrought austenitic and austenitic-ferritic (duplex) stainless steels with specific inspection require.pdf
  • 相关搜索

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

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