【填空题】在Excel工作簿中,执行下列代码后,sheet1工作表D8单元格的值是 。 Sub 偏移() For I = 2 To 10 Sheet1.Range("A" & CStr(I)) = I Sheet1.Range("A" & CStr(I)).Offset(I, 3) = Sheet1.Range("A" & CStr(I)) + 3 Next I End Sub
举一反三
- for i in range(1, 3): for j in range(1, 3): if i * j <; 2: continue print i * j
- 1/5 下列代码的运行结果是?for i in range(3):print('i') A: i i i B: 0 1 2 C: 1 2 3 D: 3 3 3
- 编写一段代码使用for循环输出1~10之内的奇数,以下哪些选项的结果是正确的?( ) A: for i in range(10): if i % 2 == 1: print(i) B: for i in range(9): if i % 2 == 0: print(i) C: for i in range(11): if i % 2 == 1: print(i) D: for i in range(12): if i % 2 = 0: print(i)
- 下列程序的执行结果是( ).for i in range(2): print(i,end=' ' )for I in range(4,6): print(I,end=' ' ) A: 2 4 6 B: 0 1 2 4 5 6 C: 0 1 0 1 2 3 D: 0 1 4 5
- Public Sub Proc(a%( )) Static i% Do a(i) = a(i) + a(i + 1) i = i + 1 Loop While i < 2 End Sub Private Sub Command1_Click( ) Dim m%, i%, x%(10) For i = 0 To 4: x(i) = i + 1: Next i For i = 1 To 2: Call Proc(x): Next i For i = 0 To 4: Print x(i);: Next i End Sub A: 3 4 7 5 6 B: 3 5 7 4 5 C: 2 3 4 4 5 D: 4 5 6 7 8