中国大学MOOC: 在窗体上添加一个命令按钮Command1,编写如下事件过程,运行时单击按钮,显示结果为( )。Private Sub Command1_Click() For i = 1 To 4 For j = 4 To 8 Sum = Sum + 1 Next j Next i Print SumEnd Sub
举一反三
- 窗体上有一个命令按钮Command1,编写如下事件过程: Private Sub Command1_Click() For i=1 to 4 For j=4 to 8 sum=sum+1 Next j Next i Print sum End Sub 运行时,单击按钮,输出结果是( )
- 窗体上有一个命令按钮Command1,编写Command1_Click()事件过程:For i = 1 To 4: For j = 4 To 8: Sum = Sum + 1: Next j: Next i,运行后,单击按钮,变量Sum的结果是
- 在窗体上添加一个命令按钮Command1,然后编写如下事件过程: Private Sub Command1_Click() For i = 1 To 4 x = 4 For j = 1 To 3 x = 3 For k = 1 To 2 x = x + 6 Next k Next j Next i Print x End Sub 程序运行后,单击命令按钮,显示结果为( )。
- 在窗体上画一个命令按钮Command1,并编写如下程序:Private Sub Command1_Click() Dim i%, j% For i = 1 To 4 For j = 1 To i Print "*"; Next j Print Next iEnd Sub在程序执行后,单击按钮Command1,在窗体上显示的图案为____。 A: ********** B: **** <br/>*** <br/>** * C: * <br/>** *** **** D: **********
- 在窗体上面添加一个命令按钮Command1,然后编写如下事件过程: Private Sub Command1_Click() Dim a1(4, 4), a2(4, 4) For i = 1 To 4 For j = 1 To 4 a1(i, j) = i + j a2(i, j) = a1(i, j) + i + j Next j Next i Print a1(3, 3); a2(3, 3) End Sub 程序运行后,单击命令按钮,在窗体上输出的内容是( )