100的阶乘等于多少啊?

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/08 08:48:48
100的阶乘等于多少啊?100的阶乘等于多少啊?100的阶乘等于多少啊?精确答案:93326215443944152681699238856266700490715968264381621468592

100的阶乘等于多少啊?
100的阶乘等于多少啊?

100的阶乘等于多少啊?
精确答案:93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000

Private Sub Form_click()
Dim a(1 To 3000) As Integer, n As Integer
Dim wei As Integer, jinwei As Integer, w As Integer
n = InputBox("请输入一个小于1000的正整数以计算其阶乘", "输入框")
wei = 1
For...

全部展开

Private Sub Form_click()
Dim a(1 To 3000) As Integer, n As Integer
Dim wei As Integer, jinwei As Integer, w As Integer
n = InputBox("请输入一个小于1000的正整数以计算其阶乘", "输入框")
wei = 1
For i = 1 To 3000
a(i) = 1
Next
For i = 2 To n
jinwei = 0
For j = 1 To wei
w = a(j) * i + jinwei
a(j) = w Mod 10
jinwei = Int(w / 10)
Next j
Do While jinwei > 0
wei = wei + 1
a(wei) = jinwei Mod 10
jinwei = jinwei \ 10
Loop
Next i
Print n; "的阶乘共"; wei; "位"
nn = wei - 30
Do
For i = wei To nn Step -1
Print a(i);
Next
Print
wei = nn - 1
nn = wei - 30
Loop While nn > 1
For i = wei To 1 Step -1
Print a(i);
Next
End Sub

收起

100!=9.332621544e157

93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000

93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000
n!的斯特林近似公式:
n!≈[(n/e)^n]*sqrt(2n*pi)

100!93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000
因为n!=1×2×3×4×……×n

二楼的是TURBO PASCAL吗

____用C语言(一个for循环就搞定)或别的什么语言相当容易实现,答案是:
100!=93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000