我忘记这个算法了.你会直接把公式写出来得了.
[url=http://www./html/6/6694/]极道金丹[/url][url=http://www./html/2/2849/]九阴九阳[/url][url=http://www./html/2/2596/]凡人修仙传[/url]
随写的.没有测试.
private sub command1_click()
dim n as integer
dim s as double
dim i as integer
n = inputbox("input number 5~10")
s = 1 + n
for i = 2 to n
s = s + getdata(n, i) / getpri(i)
next
msgbox s
end sub
private function getdata(byval n as integer, i as integer) as double
dim j as integer
dim s as double
s = 1
for j = 1 to i
s = s * n
next
getdata = s
end function
private function getpri(byval n as integer) as double
dim i as integer
dim s as double
s = 1
for i = 1 to n
s = s * i
next
getpri = s
end function
private sub command2_click()
text2.text = lcase(text1.text)
end sub