下列循环的执行结果是( ).sum = 0for i in... = sum + iprint(sum)
举一反三
- 下面语句的执行结果是sum <- 0for(i in 1:100)sum = sum + iprint(sum) A: 5050 B: 5000 C: 5020 D: 5045
- 下面程序段的运行结果是____。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 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(100):if(i%10): continuesum=sum+iprint(sum)
- 如下程序实现了1-100的累乘计算sum = 0for i in range(1,101): sum+=iprint(sum)