有一个数列,它的前三个数是0,1,2,从第四个数起,每个数都是它前面的两个数之和,求出该数列的第17个数是多少,并求出该数列的第几个数起每个数都超过1E+8

Private Sub Form_Click() Dim last_one As Long Dim last_two As Long Dim this_one As Long Dim i As Integer last_one = 1 '数列的第二个数 last_two = 2 '数列的第三个数 i = 4 '从数列的第四个数求起 Do this_one = last_one + last_two last_one = last_two last_two = ------1------- If i = 17 Then Form1.Print "No:17="; this_one End If ------2------ Loop While this_one <= 100000000 Form1.Print "No:";------3------; "is > 1E+8" End Sub

时间:2024-04-16 14:34:20

相似题目