ACCESS中的VBA编程题目。帮忙。在线等。谢啦

2024-11-11 01:04:56
推荐回答(1个)
回答1:

Sub main()
Dim a As Double
a = InputBox("请输入一数:", "提示:", 0)
MsgBox mymax(a, 1, 2)
MsgBox area(a)
End Sub

Function area(r As Double)
area = 3.1415926 * r * r
End Function

Function mymax(d1 As Double, d2 As Double, d3 As Double)
If d1 >= d2 Then
mymax = d1
Else
mymax = d2
End If
If mymax < d3 Then
mymax = d3
End If
End Function