怎样用vb打印出fibonacci数列?

2025-06-21 09:23:26
推荐回答(1个)
回答1:

输出fibonacci数列,前10项
Dim i As Integer
Dim a As Integer
Dim b As Integer
Dim c As Integer
a = 1
b = 1
Print a
Print b
For i = 3 To 10
c = a + b
Print c
a = b
b = c
Next i