题目内容

(8 )在窗体上画 1 个名称为 Command1 的命令按钮和 2 个名称分别为 Text1 、 Text2 的文本框,如图 5 所示,然后编写下列程序:
Function Fun(x As Integer,ByVal y As Integer)As Integer
x=x+y
If x<0 Then
Fun=x
Else
Fun=y
End If
End Function
Private Sub Command1_Click()
Dim a As Integer,b As Integer
a=-10 : b=5
Text1.Text=Fun(a, b)
Text2.Text=Fun(a, b)
End Sub
程序运行后,单击命令按钮, Text1 和 Text2 文本框显示的内容分别是 【 9 】 和 【 10 】 。

查看答案
更多问题

倾斜井巷更换和翻修轨道时,开工前上部挡车器或挡车栏必须处于()状况,方可进入现场施工。

A. 常开
B. 常闭
C. 半开半闭

Electronic goods such as laser prints and computers all contribute to_________

A teacher who is 74 will be able to make his lessons more lively.

You can save a lot of time and avoid misunderstandings if you communicate clearly and ____________.

答案查题题库