【计算机类职业资格】二级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; /*返回素数的个数*/)解析:解析 这道题是考查一个数是不是素数,只要掌握了判断素数的方法,问题便能顺利解决,请以此题为例,掌握判断素数的方法。

展开阅读全文
相关资源
猜你喜欢
  • BS EN 3475-807-2002 Aerospace series - Cables electrical aircraft use - Test methods - Transfer impedance《航空航天系列 飞行器用电缆 试验方法 转移阻抗》.pdf BS EN 3475-807-2002 Aerospace series - Cables electrical aircraft use - Test methods - Transfer impedance《航空航天系列 飞行器用电缆 试验方法 转移阻抗》.pdf
  • BS EN 3475-808-2002 Aerospace series - Cables electrical aircraft use - Test methods - Cross-talk《航空航天系列 飞行器用电缆 试验方法 交叉谈话》.pdf BS EN 3475-808-2002 Aerospace series - Cables electrical aircraft use - Test methods - Cross-talk《航空航天系列 飞行器用电缆 试验方法 交叉谈话》.pdf
  • BS EN 3475-809-2009 Aerospace series - Cables electrical aircraft use - Test methods - Part 809 Resistance unbalance《航空系列 飞行器用电缆试验方法 第809部分 电阻不平衡》.pdf BS EN 3475-809-2009 Aerospace series - Cables electrical aircraft use - Test methods - Part 809 Resistance unbalance《航空系列 飞行器用电缆试验方法 第809部分 电阻不平衡》.pdf
  • BS EN 3475-810-2009 Aerospace series - Cables electrical aircraft use - Test methods - Structural return loss《航空航天系列 航空器用电缆 试验方法 结构回路损耗》.pdf BS EN 3475-810-2009 Aerospace series - Cables electrical aircraft use - Test methods - Structural return loss《航空航天系列 航空器用电缆 试验方法 结构回路损耗》.pdf
  • BS EN 3475-811-2009 Aerospace series - Cables electrical aircraft use - Test methods - Unbalance attenuation《航空航天系列 航空器用电缆 试验方法 不平衡衰减》.pdf BS EN 3475-811-2009 Aerospace series - Cables electrical aircraft use - Test methods - Unbalance attenuation《航空航天系列 航空器用电缆 试验方法 不平衡衰减》.pdf
  • BS EN 3475-812-2009 Aerospace series — nCables electrical naircraft use — Test nmethods nPart 812 Return loss (VSWR)《航空航天系列 飞行器用电缆 试验方法 第812部分 回损(电压驻波比VSWR)》.pdf BS EN 3475-812-2009 Aerospace series — nCables electrical naircraft use — Test nmethods nPart 812 Return loss (VSWR)《航空航天系列 飞行器用电缆 试验方法 第812部分 回损(电压驻波比VSWR)》.pdf
  • BS EN 3476-2006 Aerospace series - Steel FE-PL1501 (30CrMo12) - Air melted - Softened - Forging stock - a or D u 300 mm《航空航天系列 FE-PL1501(30CrMo12)型钢 空气冶炼 软化的 锻坯 a或D≤300mm》.pdf BS EN 3476-2006 Aerospace series - Steel FE-PL1501 (30CrMo12) - Air melted - Softened - Forging stock - a or D u 300 mm《航空航天系列 FE-PL1501(30CrMo12)型钢 空气冶炼 软化的 锻坯 a或D≤300mm》.pdf
  • BS EN 3479-2007 Aerospace series - Steel FE-PM1802 (X5CrNiCu15-5) - Consumable electrode remelted - Solution treated and precipitation treated - Plate - 6 mm a 20 mm - 1070 MPa Rm .pdf BS EN 3479-2007 Aerospace series - Steel FE-PM1802 (X5CrNiCu15-5) - Consumable electrode remelted - Solution treated and precipitation treated - Plate - 6 mm a 20 mm - 1070 MPa Rm .pdf
  • BS EN 348-1992 Protective clothing - Determination of behaviour of materials on impact of small splashes of molten metal《防护服 材料抗熔融金属少量喷溅影响的性能测定》.pdf BS EN 348-1992 Protective clothing - Determination of behaviour of materials on impact of small splashes of molten metal《防护服 材料抗熔融金属少量喷溅影响的性能测定》.pdf
  • 相关搜索

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

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