I still cannot figure () the sum I require.A、inB、outC、upD、over
I still cannot figure () the sum I require.
A、in
B、out
C、up
D、over
相关考题:
Unwanted tickets can be given () at the theatre office window up to half an hour before the performance. A.inB.outC.offD.over
若有以下程序段,sum和i都是整型变量,则不能与下面程序段等价的选项是() sum=0; i=2; while(i<=10) { sum=sum+i; i++; }A.for(i=2, sum=0; i<=10; i++) sum+=i;B.sum=0; i=2; do{ sum=sum+i; i++; }while(i<=10);C.sum=0; i=10; while(i>1) { sum=sum+i; i--; }D.sum=0; i=11; do{ sum=sum+i; i--; }while(i>1);
1、求:1-1/2+1/3-1/4+...+1/99-1/100 下面()是正确的。A.sum=0; sign=1.0; for(i=1;i<=100;i++) { term =sign/ i; sum += term; sign=-sign; }B.sum=0; for(i=1;i<=100;i++) { sum =sum+(-1)^(i+1)* (1./i); }C.sum=0; for(i=1;i<=100;i++) { sum =sum+pow(-1,i+1)* (1.0/i); }D.sum=0; for(i=1;i<=100; i=-i) { term =1./ i; sum += term; i++; }
已定义整型变量i和sum,与以下程序段功能一样的程序有()。 sum=0; for(i=1;i<=100;i++)sum+=i;A.sum=0;i=1;for(; i<=100;i++) sum+=i;B.sum=0;for(i=1;i<=100;){i++;sum+=i;}C.sum=0;for(i=1;i<=100;) sum+=i;i++;D.sum=0;for(i=1;;i++ )