单选题
VB
题号 #142401
在窗体上画1个名称为Command1的命令按钮,然后编写如下事件过程
Option Base 1
Pribate Sub Command1_Click()
Dim a(5.5) As Integer
For i=1 To 5
a(I,j)*5\10
Next j
Next i
S=0
For i=1 To 5
S=s+a(i,i)
Next i
Print s
End Sub
程序运行后,单击命令按钮,输出结果是( )。
参考答案
A
答案解析
暂无解析
你可能感兴趣的试题
A.Private Sub Text1__KeyPress(KeyAscii AS Integer)
If KeyAscii=13 Then ‘回车符的ACSII码是13
a=Val(Text1)
If a>=0 or a<=100 Then
Text2.SetFocus
Else
Text1. SetFocus ; MsgBox(“分数错”)
End If
End If
End Sub
If KeyAscii=13 Then ‘回车符的ACSII码是13
a=Val(Text1)
If a>=0 or a<=100 Then
Text2.SetFocus
Else
Text1. SetFocus ; MsgBox(“分数错”)
End If
End If
End Sub
B.Private Sub Text1__KeyPress(KeyAscii AS Integer)
If KeyAscii=13 Then ‘回车符的ACSII码是13
a=Val(Text1)
If a>=0 And a<=100 Then
Text1.SetFocus
Else
Text2. SetFocus ; MsgBox(“分数错”)
End If
End If
End Sub
If KeyAscii=13 Then ‘回车符的ACSII码是13
a=Val(Text1)
If a>=0 And a<=100 Then
Text1.SetFocus
Else
Text2. SetFocus ; MsgBox(“分数错”)
End If
End If
End Sub
C.Private Sub Text1__KeyPress(KeyAscii AS Integer)
If KeyAscii=13 Then ‘回车符的ACSII码是13
a=Val(Text1)
If a<0 And a>100 Then
Text2.SetFocus
Else
Text1. SetFocus ; MsgBox(“分数错”)
End If
End If
End Sub
If KeyAscii=13 Then ‘回车符的ACSII码是13
a=Val(Text1)
If a<0 And a>100 Then
Text2.SetFocus
Else
Text1. SetFocus ; MsgBox(“分数错”)
End If
End If
End Sub
D.Private Sub Text1__KeyPress(KeyAscii AS Integer)
If KeyAscii=13 Then ‘回车符的ACSII码是13
a=Val(Text1)
If a>=0 And a<=100 Then
Text2.SetFocus
Else
Text1. SetFocus ; MsgBox(“分数错”)
End If
End If
End Sub
If KeyAscii=13 Then ‘回车符的ACSII码是13
a=Val(Text1)
If a>=0 And a<=100 Then
Text2.SetFocus
Else
Text1. SetFocus ; MsgBox(“分数错”)
End If
End If
End Sub
A.计算矩阵外围一圈元素的累加和
B.计算矩阵除外一圈以外的所有元素的累加和
C.计算矩阵第1列和最后一列元素的累加和
D.计算矩阵第1行和最后一行元素的累加和