填空题 下列程序的功能是根据两直角边计算直角三角形的斜边并输出,完成下列程序。
Private Sub Command1_Click()
a%=InputBox("Input LineA")
b%=InputBox("Input LineB")
c%= 1
If c%<=0Then
Print"Wrong Lines!"
Else
Print c%
End If
End Sub
Private Function GetValue(ByVal a As Integer, ByVal b As Integer)As Integer
If a<=0 Or b<=0 Then Exit Function
GetValue= 2
End Function
【正确答案】
【答案解析】GetValue(a, b);Sqr(a*a+b*b)