下面的程序代码是通过函数求出二个整数型变量a、b中的较大值,其中所定义的函数名是( )
Function max(a,b As Integer) As Integer
If a>b Then max="a" Else max=b
End Function
Private Sub Command1_Click()
Dim a As Integer,b As Integer,s as integer
a=Val(Text1.Text):b=Val(Text2.Text)
s=max(a,b)
Text3.Text=s
End Sub
A.Command1_Click |
B.Function |
C.max |
D.max(a,b As Integer) |
相关知识点
推荐试卷