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

展开阅读全文
相关资源
猜你喜欢
  • AECMA PREN 4173-1999 Aerospace Series Lockbolts 100 Degree Countersunk Normal Head Sheartype Close Tolerance in Titanium Alloy TI-P64001 Anodized Metric Series Classification 1 100.pdf AECMA PREN 4173-1999 Aerospace Series Lockbolts 100 Degree Countersunk Normal Head Sheartype Close Tolerance in Titanium Alloy TI-P64001 Anodized Metric Series Classification 1 100.pdf
  • AECMA PREN 4174-1999 Aerospace Series Collars Swage Locking Sheartype in Aluminium Alloy 2024 Anodized or Chromated Metric Series Edition P 1《航空航天系列.阳极氧化或铬酸盐处理铝合金2024、铆紧剪式垫圈 米制系列》.pdf AECMA PREN 4174-1999 Aerospace Series Collars Swage Locking Sheartype in Aluminium Alloy 2024 Anodized or Chromated Metric Series Edition P 1《航空航天系列.阳极氧化或铬酸盐处理铝合金2024、铆紧剪式垫圈 米制系列》.pdf
  • AECMA PREN 4175-1999 Aerospace Series Collars Flanged Swage Locking Sheartype in Titanium TI-P99002 Metric Series Edition P 1《空航天系列 钛 TI-P99002、法兰式铆紧剪式垫圈 米制》.pdf AECMA PREN 4175-1999 Aerospace Series Collars Flanged Swage Locking Sheartype in Titanium TI-P99002 Metric Series Edition P 1《空航天系列 钛 TI-P99002、法兰式铆紧剪式垫圈 米制》.pdf
  • AECMA PREN 4176-1999 Aerospace Series Lockbolts 100 Degree Countersunk Normal Head or Protruding Head Tension- Sheartype Close Tolerance in Titanium Alloy TI-P64001 Anodized or wit.pdf AECMA PREN 4176-1999 Aerospace Series Lockbolts 100 Degree Countersunk Normal Head or Protruding Head Tension- Sheartype Close Tolerance in Titanium Alloy TI-P64001 Anodized or wit.pdf
  • AECMA PREN 4178-1994 Aerospace Series Screws Pan Head Six Lobe Recess Coarse Tolerance Normal Shank Medium Length Thread in Titanium Alloy Anodized MoS2 Lubricated Classification  .pdf AECMA PREN 4178-1994 Aerospace Series Screws Pan Head Six Lobe Recess Coarse Tolerance Normal Shank Medium Length Thread in Titanium Alloy Anodized MoS2 Lubricated Classification .pdf
  • AECMA PREN 4179-2008 Aerospace series Qualification and approval of personnel for non-destructive testing Edition P4《航空航天系列.无损检测人员的合格与核准》.pdf AECMA PREN 4179-2008 Aerospace series Qualification and approval of personnel for non-destructive testing Edition P4《航空航天系列.无损检测人员的合格与核准》.pdf
  • AECMA PREN 4180-1994 Aerospace Series Titanium and Titanium Alloys Circular Tubes for Fluids Large Tolerances Diameter 4 mm Less Than or Equal to D Less Than or Equal to 40 mm Thicr.pdf AECMA PREN 4180-1994 Aerospace Series Titanium and Titanium Alloys Circular Tubes for Fluids Large Tolerances Diameter 4 mm Less Than or Equal to D Less Than or Equal to 40 mm Thicr.pdf
  • AECMA PREN 4182-1994 Aerospace Series Pipe Coupling 8 Degrees 30' in Titanium Alloy Tee Reduced Edition P 1《航空航天系列.导管接头8°30′钛合金球座.P1版》.pdf AECMA PREN 4182-1994 Aerospace Series Pipe Coupling 8 Degrees 30' in Titanium Alloy Tee Reduced Edition P 1《航空航天系列.导管接头8°30′钛合金球座.P1版》.pdf
  • AECMA PREN 4183-1994 Aerospace Series Pipe Coupling 8 Degrees 30' in Titanium Alloy Elbows 90 Degrees Double Welded Edition P 1《航空航天系列.导管接头8°30′钛合金90度双焊接.P1版》.pdf AECMA PREN 4183-1994 Aerospace Series Pipe Coupling 8 Degrees 30' in Titanium Alloy Elbows 90 Degrees Double Welded Edition P 1《航空航天系列.导管接头8°30′钛合金90度双焊接.P1版》.pdf
  • 相关搜索

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

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