sub print(N as integer,c as string)
for i = 1 to N
print c
next
end sub
这个是每打印一次占一行
sub print(N as integer,c as string)
dim i as integer,s as string
s=""
for i = 1 to N
s=S &c
next
print s
end sub
Option ExplicitDim X() As Long
Sub Fun(ByRef A() As Long)
Dim J As Integer
X(1) = 1
X(2) = X(1)
For J = 3 To UBound(A)
X(J) = X(J - 1) + X(J - 2)
Next J
End Sub
Private Sub Form_Load()
Dim I As Integer, n As Integer
Form1.AutoRedraw = True
Do
n = Val(InputBox("斗郑猛请输入数列的项数(空桥n>2)"丛模))
Loop Until n >2
ReDim X(1 To n)
Fun X()
For I = 1 To n
Print X(I),
If I Mod 5 = 0 Then Print
Next I
End Sub
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)