vb放在数组中求N!

2024-12-30 07:25:49
推荐回答(4个)
回答1:

‘是这意思?
Private Sub Command1_Click()
Dim s As String, a(), i
s = "12345"
ReDim a(1 To Len(s))
For i = 1 To UBound(a)
a(i) = Mid(s, i, 1)
Next
Print Join(a, ",")
End Sub

回答2:

private sub command1_click()
dim a(5) %
for i=1 to 5
a(i)=i
picture1.print a(i)
next i
end sub

回答3:

dim s as integer
s = 0
for i = 1 to n
a(i) = i
s = s + a(i)
next i
print s

回答4:

for i = 1 to 5
a(i)=i
print a(i);
next