On Error GoTo myErr:
Dim intA() As Integer, intT() As Integer, i As Integer
Dim j As Integer, intR As Integer
ReDim intA(20), intT(20)
If intC < 2 Then Exit Function
intR = 20
intA(0) = 1
For i = 2 To intC
For j = 0 To intR
intT(j) = intA(j) * i
Next j
j = 0
Do Until j > intR
intA(j) = intT(j) Mod 10
If intT(j) >= 10 Then intT(j + 1) = intT(j + 1) + intT(j) \ 10
j = j + 1
Loop
Next i
Do While True
j = j - 1
If intA(j) > 0 Then Exit Do
Loop
For j = j To 0 Step -1
Factorial = Factorial & intA(j)
Next j
Exit Function
myErr:
If Err.Number = 9 Then
intR = intR + 20
ReDim Preserve intA(intR)
ReDim Preserve intT(intR)
Resume
Else
MsgBox "UnKnow ERR:" & Err.Description & ":" & Err.Number, vbCritical + vbOKOnly
End If
End Function
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/
领测软件测试网最新更新
关于领测软件测试网 | 领测软件测试网合作伙伴 | 广告服务 | 投稿指南 | 联系我们 | 网站地图 | 友情链接
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备10010545号-5
技术支持和业务联系:info@testage.com.cn 电话:010-51297073
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备10010545号-5
技术支持和业务联系:info@testage.com.cn 电话:010-51297073










