• 2022-06-15
    如果N=2,Sum(N)是一个函数,且Sum(1)=5,那么语句:Set Sum=Sum(N-1) +N将把值6赋给Sum。If N = 2, Sum (N) is a function and Sum (1) = 5, then the statement:Set Sum = Sum (N-1) +NThe value 6 will be assigned to Sum.
  • 内容

    • 0

      int i=1,sum=0,n; scanf ("%d",&n) ; while (i<=n) sum=sum+I;

    • 1

      下面程序可以正确求出1+2+3+。。。+n的和。() #include intmain() { inti=1,sum=0,n; scanf(“%d”,&n); while(i<=n) sum=sum+i; ++i; printf("sum=%d",sum); return0; }

    • 2

      下面程序可以正确求出1+2+3+。。。+n的和。() #include int main( ) { int i = 1,sum = 0,n; scanf(“%d”,&n); while (i <= n) sum = sum + i; ++i; printf("sum=%d

    • 3

      4.编程计算1+3+5…+99的值main(){ int i, sum = 0;i=1;while ( ) { sum = sum + i; ; } printf("sum=%d\n", sum);}

    • 4

      ${X_1},{X_2},...,{X_n}$是来自均匀分布X~U(-a,a)的样本,用矩估计法估计参数a为() A: ${(\frac{3}{n}\sum\limits_{k = 1}^n {x_k^2} )^{\frac{1}{2}}}$ B: ${(\frac{2}{n}\sum\limits_{k = 1}^n {x_k^2} )^{\frac{1}{2}}}$ C: ${(\frac{3}{n}\sum\limits_{k = 1}^n {x_k} )^{\frac{1}{2}}}$ D: ${(\frac{2}{n}\sum\limits_{k = 1}^n {x_k} )^{\frac{1}{2}}}$