题目内容
(请给出正确答案)
[单选题]
在窗体上画一个名称为Command1的命令按钮和一个名称为Text1的文本框,然后编写以下程序代码: Private Sub sub1(ByRef d(), ByRef m1 As Integer) Dim i As Integer m1 = d(LBound(d)) For i = LBound(d) + 1 To UBound(d) If m1 < d(i) Then m1 = d(i) Next i End Sub Private Sub Command1_Click() Dim n1 As Integer n1=-1 Dim data() data = Array(10, 20, -20, 50, 15, -5) Call sub1(data(), n1) Text1.Text = n1 End Sub 程序运行过程中,当单击命令按钮Command1时,则在文本框Text1中显示的结果为________
A.0
B.-1
C.-5
D.50
答案
B、-1
如搜索结果不匹配,请 联系老师 获取答案