VB编写程序 计算1*2*3*...*n 找出能使计算结果大于10^6的值
VB编写程序 计算1*2*3*...*n 找出能使计算结果大于10^6的值
日期:2014-04-14 21:56:49 人气:2
function jc(n as integer) as long
dim i as integer
jc=1
for i=2 to n
jc=jc*i
next
end function
Private sub form_click()
dim n as integer, s as long
do
n=n+1
s=jc(n)
loop until s>10^6
print "当n大于等于"; n; "时1*2*3*.