下列程序段的执行结果为 ( )。 a=0:b=1 Do a=a+b b=b+1 Loop While a<10 Print a;b
举一反三
- 下列程序运行后,输出的结果为( ) B=1 Do while b<40 B=b*(b+1) Loop Print B
- 下列程序运行后,输出的结果为( ) B=1 Do while b<40 B=b*(b+1) Loop Print B
- 下列程序段的执行结果为______。 x = 0: y = 1 z = 1: n = 0 Do x = x + y + z n = n + 1 Loop While x < 10 Print x; n A: 10 5 B: x n C: 9 5 D: 10 6
- 有如下程序段:s = 0For i = 1 To 10 s = s + iNext iPrint s与上述程序段输出结果相同的程序段为( )。 A: s = 0: i = 0 While i <= 10 i = i + 1 s = s + i Wend Print s B: s = 0: i = 1 While i < 10 i = i + 1 s = s + i Wend Print s C: s = 0: i = 1 Do s = s + i i = i + 1 Loop While i < 10 Print s D: s = 0: i = 1 Do s = s + i i = i + 1 Loop Until i > 10 Print s
- 下列程序段运行后,输出结果是____。 B=1 Do until b>7 b=b*(b+1) Loop Print b