【单选题】【消耗次数:1】
下面的程序段中,循环体执行的次数是( )。 Dim I,s For I=1 to 10 Step 2 s=s+I Next I
1
10
0
5
参考答案:
复制
纠错
相关题目
【单选题】 下面的程序段中,循环体执行的次数是( )。 Dim I,s For I=1 to 10 s=s+I Next I
①  1
②  10
③  0
④  11
【单选题】 在下面循环语句中循环体执行的次数为()。 int i=0,s=0; while(s<20) {i++; s+=i;}
①  4
②  5
③  6
④  7
【单选题】 在下面循环语句中循环体执行的次数为( ) int i=0,s=0; while(s<20) {i++; s+=i;}
①  4
②  5
③  6
④  7
【单选题】 在下面循环语句中循环体执行的次数为( ) int i=0,s=0; while(s20) {i++; s+=i;}
①  4
②  5
③  6
④  7
【单选题】 在下面循环语句中循环体执行的次数为()。 int i=0,s=0; while(s20) {i++; s+=i;}
①  4
②  5
③  6
④  7
【简答题】 下列程序段的运行结果是[填空] 。 Private Sub Form_Click() Dim a(3) As Long a(0) = 1: a(1) = 2: a(2) = 3: a(3) = 4 j = 1 For i = 3 To 0 Step -1 s = s + a(i) * j j = j * 10 Next i Print s End Sub
【单选题】 下列程序段的循环结构执行后,i的输出值是_______。 Dim y as Integer For i = 1 To 10 Step 2 y = y + i Next i Print i
①  25
②  10
③  11
④  因为y初值不知道,所以不确定
【单选题】 在下面循环语句中内层循环体S语句的执行总次数为( ) for(int i=0; i i++) for(int j=i; j j++) S;
①  n2
②  (n+1)/2
③  n(n-1)/2
④  n(n+1)/2
【单选题】 在下面循环语句中内层循环体S语句的执行总次数为()。 for(int i=0; i i++) for(int j=i; j j++) S;
①  n2
②  (n+1)/2
③  n(n-1)/2
④  n(n+1)/2
【单选题】 在下面循环语句中内层循环体S语句的执行次数为( )。 for(int i=0;i<n;i++) for(int j=i;j<n;j++)S;
①  n2
②  (n+1)/2
③  n(n-1)/2
④  n(n+1)/2
随机题目
【判断题】 A: What can I do for you, sir? B: Nothing.
①  正确
②  错误
【判断题】 A: What do you think of these skirts? B: I think nothing.
①  正确
②  错误
【判断题】 A: If it doesnt rain tomorrow, we will visit the Great Wall. B: Well done.
①  正确
②  错误
【判断题】 A: What do you do? B: I do well in my studies.
①  正确
②  错误
【判断题】 A: I had a good holiday this time. B: Congratulations.
①  正确
②  错误
【判断题】 A: I’m sorry I’m late again. B: Never mind.
①  正确
②  错误
【判断题】 A: That box is too heavy for me to lift. B: Ill give you a hand.
①  正确
②  错误
【判断题】 A:How long does it take to get there? B: About 20 miles.
①  正确
②  错误
【判断题】 A: I must apologize to you for the delay. B: You are welcome.
①  正确
②  错误
【判断题】 A: How is the child? B: He is much better.
①  正确
②  错误