'Pi的精确度随n的增大而增大(但由于VB本身的精度有限所以是不可能有10000位的) Public Function Pi(ByVal n As Integer) As Double Pi = n * Sin(3.14159 / n) End Function