题库 高中信息

题干

下面VB程序的功能为:在文本框Text1和Text2中输入两个整数,单击按钮对象Command1,在标签对象Label1中显示这两个数的差。
Function lsc(x,y) As Integer
 If x>y Then
lsc=x-y
 Else
lsc=y-x
 End If
End Function
Private Sub Command1_Click( )
 Dim a1 As Integer,a2 As Integer
 a1=Val(Text1.Text)
 a2=Val(Text2.Text)
 Label1.Caption=________
End Sub
要实现上述功能,程序画线处应填入的语句为( )
A.lsc(x,y)B.lsc(Text1.Text,Text2.Text)
C.lscD.lsc(a1,a2)
上一题 下一题 0.99难度 选择题 更新时间:2020-01-17 01:18:36

答案(点此获取答案解析)