网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

有如下程序段,该程序段执行完后,执行循环的次数是

total=0

Counter=1

Do

Print Counter

total=total + Counter

Print total

Counter=Counter + 1

If total > 10 Then

Exit Do

End If

Loop While Counter <=10( )。

A.5

B.10

C.15

D.20


参考答案

更多 “ 有如下程序段,该程序段执行完后,执行循环的次数是total=0Counter=1DoPrint Countertotal=total + CounterPrint totalCounter=Counter + 1If total 10 ThenExit DoEnd IfLoop While Counter =10( )。A.5B.10C.15D.20 ” 相关考题
考题 有如下的程序段,该程序段执行完后,共执行的循环次数是 total=0 Counter=1 Do Print Counter total=total * Counter + 1 Print total Counter=Counter +1 If total > 10 Then Exit Do End If Loop While Counter<=10A.4B.10C.15D.20

考题 以下程序段中Do...Loop 循环执行的次数为【 】。程序执行完毕后,n的值为【 】。Private Sub Command1_Click()n =5DoIf n Mod 2= 0 Thenn =n \2Elsen =n* 3 + 1End IfLoop Until n=1End Sub

考题 有如下程序段,该程序段执行完后,执行循环的次数是 total=0 Counter=1 Do Print Counter total=total + Counter Print total Counter=Counter+1 If total>10 Then Exit Do End If Loop While Counter <=10A.5B.10C.15D.20

考题 有如下的程序段,该程序段的执行完后,共执行循环的次数是 Private Sub Command1_Click() total=0 Counter=l Do Print Counter total=total+Counter Print total Counter=Counter+1 If total>=10 Then Exit Do End If Loop While Counter<=10 End SubA.5B.10C.12D.20

考题 有如下程序段,该程序段执行完后,共执行循环的次数是 Private Sub Command1_Click( ) Tota1=0 Counter=1 Do Print Counter Tota1=tota1+Counter Print total Counter=Counter+1 If total=10 Then Exit Do End lf Loop While Counter<=10 End SubA.5B.10C.12D.20

考题 有如下程序段:执行该程序段后,X的值为( )。A.trueB.falseC.0D.1

考题 下面程序段中循环体的执行次数是[ ]。  a=10; b=0;  do{b+=2;a-=2+b; }while (a>=0);

考题 【填空题】下面程序段中循环体的执行次数是 。 a=10;b=0; do{b+=2;a-=2+b;}while(a>=0);

考题 有如下程序段: int total = 0; for (int i = 0; i < 4; i++ ){ if (i == 1) continue; if (i == 2) break; total += i; } 则执行完该程序段后total的值为:()A.0B.1C.3D.6