The Passage tells us that ()
Americans are forced to be efficient against their will
B. Americans should do what they are willing to do
C. people ought not to work so hard for efficiency
D. Americans are at a loss what to do
下列给定程序中,函数fun的功能是:有N×N矩阵,以主对角线为对称线,对称元素相加并将结果存放在左下三角元素中,右上三角元素置为O。 例如,若N=3,有下列矩阵: 1 2 3 …… 4 5 6 …… 7 8 9 计算后结果为: 1 0 0 …… 6 5 0 …… 10 14 9 请在下划线处填人正确的内容并把下划线删除,使程序得出正确的结果。 注意:部分源程序给出如下。 不得增行或删行,也不得更改程序的结构! 试题程序: #include<scdio.h> #define N 4 /********found********/ void fun(int(*t) (1) ) int i,j; for(i=l;i<N;i++) for(j=0;j<i=j++) /********found********/ (2) =t[i][j]+t[j][i]; /********found********/ (3) =0; main() int t[][N]=21,12,13,24,25,16,47,38,29,11,32,54,42,21,33,10,i,j; printf("\nThe original array:\n"); for(i=0;i<N;i++) for(j=0;j<N;j++) printf("%2d",t[i][j]; printf("\n"); fun(t); printf("\nThe result is:\n"); for(i=0;i<N;i++) for(j=0;j<N;j++) printf("%2d",t[i][j])= printf("\n");
下列给定程序中,函数fun的功能是:计算函数F(x,y,z)=(x+y)/(x-y)+(z+y)/(z-y)的值。其中x和y的值不相等,Z和y的值不相等。 例如,当X的值为9,y的值为11,z的值为15时,函数值为-350。 请改正程序中的错误,使它能得出正确的结果。 注意:不要改动main函数,不得增行或删行,也不得更改程序的结构! 试题程序: #include<scdlib.h> #include<stdio.h> #include<math.h> /*******found********/ #define FU(m,n)(m/n) float fun(float a,float b,float c) float value; value=FU(a+b,a-b)+FU(c+b,c-b); /********found********/ retum(Value); void main() float x,y,z,sum; printf("Input x y z:"); scanf("%f%f%f&x,&y,&z); printf("x=%f,y=%f,z=%f\n",x,y,z); if(x==y||y==z) (printf("Data error!\n");exit(0);) sum=fun(x,Y,z); printf("The result is:%5.2f\n",sum);
某项目的净现金流量表如下表所示。该项目的静态投资回收期为( )年。 t(年) 0 1 2 3 4 5 6 NC.Ft(万元) -100 -150 50 70 80 60 40
A. 3.125
B. 3.375
C. 3.47
D. 3.675