下列程序定义了NXN的二维数组,并在主函数中赋值。请编写函数fun(),函数的功能是求出数组周边元素的平方和并作为函数值返回给主函数中的s。例如:若a数组中的值为 a=0 1 2 7 9 1 11 21 5 5 2 21 6 11 1 9 7 9 10 2 5 4 1 4 1 则返回主程序后s的值应为310。 注意:部分源程序给出如下。 请勿改动主函数main和其他函数中的任何内容,仅在函数fun的花括号中填入所编写的若干语句。 试题程序: #include <stdio.h> #include<conio.h> #include<stdlib.h> #define N 5 int fun (int w[][N]) main() int a[N][N]=0,1,2,7,9,1,11,21,5,5,2, 21,6,11,1,9,7,9,10,2,5,4,1,4,1; int i,j; int s; clrscr(); printf("*****The array***+*\n"); for (i=0;i<N;i++) for(j=0;j<N;i++) printf("%4d",a[i][j]); printf("\n"); s=fun(a); printf("*****THE RESULT*****\n"); printf("The sum is:%d\n",s);
查看答案
认真阅读“给定资料”,在目前的经济形势下,大学生就业问题是备受关注的问题。请结合我国的具体情况,自拟题目,写一篇文章。要求:观点明确,内容充实,结构完整,语言生动流畅,800~1000字。
The evolutionary origins of music are wrapped in mystery. There is ample concrete evidence of musical instruments dating back to the Stone Age and much presumptive evidence about the role of music in organizing work groups, hunting parties, and religious rites. Many scholars suspect that musical and linguistic expression had common origins but then split off from one another several hundred thousand years ago. 4. The phrase split off in the passage is closest in meaning to
A. separated
B. borrowed
C. evolved
D. learned
一、根据下列文字资料回答题据我国统计部门调查,1997年全国农村劳动力在县和县以上城市就业半年以上的人数已经达3400万人,劳动力就业的文化水平、地区分布及就业领域大致如下:城市就业的农村劳动力文化水平是小学及以下的有750万人,为总量的22%;初中的有2180万人,为总量的64%;高中及以上的有470万人,为总量的14%。农村劳动力在城市就业的地区是东部地区的有1940万人,为总量的57%;西部地区的有620万人,为总量的18%。农村劳动力城市就业领域是工业、交通、运输业的有1150万,为总量的34%;服务业(含垃圾搬运等)的有510万人,为总量的15%;商业饮食业的有340万人,为总量的10%;其他行业1400万,为总量的41%。 农村劳动力城市就业领域比例最高的是( )。
A. 商业饮食业
B. 服务业
C. 工业、交通、运输业
D. 其他行业
执行下列程序,显示的结果是【 】one="WORK" two=" " a= LEN(one)i=a Do WHERE i>=1TWO=TWO+SUBSTR(one,i,1) i = i-1ENDDO two