VB编程
VB编程中的一道题目是1,1,2,3,5,8.....前面两项之和等于后面一项,循环30次,这道题目代码怎么写??
在窗体上建一按钮
[CODE]Private Sub Command1_Click()
Form1.Print
a = 1
b = 1
d = a & "," & b
Form1.Print d;
For i = 1 To 30
c = a + b
Form1.Print "," & c;
a = b
b = c
Next i
End Sub[/CODE]
请最大化后点击按钮就可显示
[此贴子已经被作者于2006-10-26 3:32:09编辑过]