下列程序共执行了______次循环。Private Sub Command1_ Click () Dim intsum As Integer Dim i AS Integer Dim j As Integer i = 1 j = 1 do do intsum = intsum + j =j+2 Print j; Loop until j >3 i = i+1 Loop until i>17 Print Print intsumEnd SubA.14B.15C.14D.13
下列程序共执行了______次循环。Private Sub Command1_ Click () Dim intsum As Integer Dim i AS Integer Dim j As Integer i = 1 j = 1 do do intsum = intsum + j =j+2 Print j; Loop until j >3 i = i+1 Loop until i>17 Print Print intsumEnd Sub
A.14
B.15
C.14
D.13
相关考题:
以下程序的输出结果是【】。 include using namespace std; int main(){ int sum,i; for( 以下程序的输出结果是【 】。include<iostream>using namespace std;int main(){int sum,i;for(sum=0,i=1;i<5;i++)sum+=i;cout<<sum<<endl;return 0;}
以下循环语句终止的条件是什么(),一共循环几次() int i=1; while(i--) { i++; }A.i=0终止循环,循环无穷次B.i=0终止循环,循环0次C.i=1终止循环,循环1次D.i=0终止循环,循环10次
如下程序中实现sum=1+2+3+...+n的程序是A.int sum=0,i; for(i=0;i<n;i++)sum+=i;B.int sum=0,i; for(i=0;i<n;i++); sum+=i;C.int sum=0,i; for(i=1;i<=n;i++); sum+=i;D.int sum=0,i; for(i=1;i<=n;i++) sum+=i;
以下求和程序应将sum的初值设为1 int sum=1; for(i = 1; i < =10 ; i++) sum += i;