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

展开阅读全文
相关资源
猜你喜欢
  • NF Z82-091-1994 Integrated Services Digital Network (ISDN) Calling line identification presentation (CLIP) and calling line identification restriction (clir) Supplementary servicess 《综.pdf NF Z82-091-1994 Integrated Services Digital Network (ISDN) Calling line identification presentation (CLIP) and calling line identification restriction (clir) Supplementary servicess 《综.pdf
  • NF Z82-092-1-1995 Integrated Services Digital Network (ISDN) Calling line identification presentation (CLIP) supplementary service Digital subscriber signalling system number one ( 《综.pdf NF Z82-092-1-1995 Integrated Services Digital Network (ISDN) Calling line identification presentation (CLIP) supplementary service Digital subscriber signalling system number one ( 《综.pdf
  • NF Z82-092-6-2008 Integrated Services Digital Network (ISDN) - Digital Subscriber Signalling System No one (DSS1) protocol - Calling Line Identification Presentation (CLIP) supplemTS).pdf NF Z82-092-6-2008 Integrated Services Digital Network (ISDN) - Digital Subscriber Signalling System No one (DSS1) protocol - Calling Line Identification Presentation (CLIP) supplemTS).pdf
  • NF Z82-093-6-2008 Integrated Services Digital Network (ISDN) - Digital Subscriber Signalling System No one (DSS1) protocol - Calling Line Identification Restriction (CLIR) supplemeS) .pdf NF Z82-093-6-2008 Integrated Services Digital Network (ISDN) - Digital Subscriber Signalling System No one (DSS1) protocol - Calling Line Identification Restriction (CLIR) supplemeS) .pdf
  • NF Z82-094-1994 Integrated Services Digital Network (ISDN) Connected line identification presentation (COLP) supplementary service Service description 《综合业务数字网络(ISDN) 连接线路识别显示的补充服务.pdf NF Z82-094-1994 Integrated Services Digital Network (ISDN) Connected line identification presentation (COLP) supplementary service Service description 《综合业务数字网络(ISDN) 连接线路识别显示的补充服务.pdf
  • NF Z82-095-1994 Integrated Services Digital Network (ISDN) Connected line identification restriction (colr) supplementary service Service description 《综合业务数字网络(ISDN) 连接线路识别限制补充服务 服.pdf NF Z82-095-1994 Integrated Services Digital Network (ISDN) Connected line identification restriction (colr) supplementary service Service description 《综合业务数字网络(ISDN) 连接线路识别限制补充服务 服.pdf
  • NF Z82-096-1994 Integrated Services Digital Network (ISDN) Connected line identification presentation (COLP) and connected line identification restriction (colr) supplementary servflow.pdf NF Z82-096-1994 Integrated Services Digital Network (ISDN) Connected line identification presentation (COLP) and connected line identification restriction (colr) supplementary servflow.pdf
  • NF Z82-102-1-1997 Integrated Services Digital Network (ISDN) User-network interface layer 3 Specifications for basic call control 《综合服务数字网(ISDN) 第3层用户网络界面 基础电话呼叫控制规范》.pdf NF Z82-102-1-1997 Integrated Services Digital Network (ISDN) User-network interface layer 3 Specifications for basic call control 《综合服务数字网(ISDN) 第3层用户网络界面 基础电话呼叫控制规范》.pdf
  • NF Z82-104-1997 Integrated Services Digital Network (ISDN) Attachment requirements for terminal equipment to connect to an ISDN using ISDN basic access Layer 3 aspects 《综合服务数字网(ISD.pdf NF Z82-104-1997 Integrated Services Digital Network (ISDN) Attachment requirements for terminal equipment to connect to an ISDN using ISDN basic access Layer 3 aspects 《综合服务数字网(ISD.pdf
  • 相关搜索

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

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