1!+2!+3!+。。。+10!是什么意思
程序里面有几个地方看不懂希望给说说privateSubform_load()Dima(1to10)Aslong,sumaslong,taslongDimnasintsho...
程序里面有几个地方看不懂 希望给说说
private Sub form_load()
Dim a (1 to 10) As long,sum as long,t as long
Dim n as int
show
t = 1
for n = 1 to 10
t=t*n
a(n)=t
next n
sum=0
for each x in a
sum=sum+x
next x
print "1!+2!+3!+.....+10!=";sum
End Sub
不是很懂 麻烦给解释下
特别是这几句
show
t = 1
for n = 1 to 10
t=t*n
a(n)=t
next n
sum=0
写的不规范 不好意思 展开
private Sub form_load()
Dim a (1 to 10) As long,sum as long,t as long
Dim n as int
show
t = 1
for n = 1 to 10
t=t*n
a(n)=t
next n
sum=0
for each x in a
sum=sum+x
next x
print "1!+2!+3!+.....+10!=";sum
End Sub
不是很懂 麻烦给解释下
特别是这几句
show
t = 1
for n = 1 to 10
t=t*n
a(n)=t
next n
sum=0
写的不规范 不好意思 展开
6个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询