题目

下面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 . lsc D . lsc(a1,a2) 答案:D
信息技术 试题推荐