下列程序中输出结果为5050的是 A: s=0for i in range(100,-1): s=s+iprint(s) B: s=0for i in range(100,1,-1): s=s+iprint(s) C: s=0for i in range(100): s=s+iprint(s) D: s=0for i in range(101): s=s+iprint(s)
下列程序中输出结果为5050的是 A: s=0for i in range(100,-1): s=s+iprint(s) B: s=0for i in range(100,1,-1): s=s+iprint(s) C: s=0for i in range(100): s=s+iprint(s) D: s=0for i in range(101): s=s+iprint(s)
请写出如下程序的执行结果。s = 0for i in ran... s = s + iprint(s)
请写出如下程序的执行结果。s = 0for i in ran... s = s + iprint(s)
下面程序段的运行结果是____。s = 1: sum = 0For i = 1 To 4 s = s * i sum = sum + sNext iPrint sum A: 24 B: 33 C: 10 D: 30
下面程序段的运行结果是____。s = 1: sum = 0For i = 1 To 4 s = s * i sum = sum + sNext iPrint sum A: 24 B: 33 C: 10 D: 30
下列循环的执行结果是( ).sum = 0for i in... = sum + iprint(sum)
下列循环的执行结果是( ).sum = 0for i in... = sum + iprint(sum)
有如下程序段: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
有如下程序段: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
如下程序实现了1-100的累乘计算sum = 0for i in range(1,101): sum+=iprint(sum)
如下程序实现了1-100的累乘计算sum = 0for i in range(1,101): sum+=iprint(sum)
【单选题】以下程序的输出结果是?y=0foriinrange(0,10,2):y+=iprint(y) A. 20 B. 30 C. 10 D. 9
【单选题】以下程序的输出结果是?y=0foriinrange(0,10,2):y+=iprint(y) A. 20 B. 30 C. 10 D. 9
下列程序的执行结果为_____。Dim intsum As IntegerDim I As Integerintsum=0For I=20.2 To 5 Step -4.7intsum=intsum +INext IPrint intsum
下列程序的执行结果为_____。Dim intsum As IntegerDim I As Integerintsum=0For I=20.2 To 5 Step -4.7intsum=intsum +INext IPrint intsum
sum=0for i in range(0,100): if i%2==0: sum-=i else: sum+=iprint(sum) A: -50 B: 49 C: 50 D: -49
sum=0for i in range(0,100): if i%2==0: sum-=i else: sum+=iprint(sum) A: -50 B: 49 C: 50 D: -49
下面语句的执行结果是sum <- 0for(i in 1:100)sum = sum + iprint(sum) A: 5050 B: 5000 C: 5020 D: 5045
下面语句的执行结果是sum <- 0for(i in 1:100)sum = sum + iprint(sum) A: 5050 B: 5000 C: 5020 D: 5045