14 lines
241 B
Text
14 lines
241 B
Text
Function fibo(n As Integer) As UInt64
|
|
|
|
Dim noOne As UInt64 = 1
|
|
Dim noTwo As UInt64 = 1
|
|
Dim sum As UInt64
|
|
|
|
For i As Integer = 3 To n
|
|
sum = noOne + noTwo
|
|
noTwo = noOne
|
|
noOne = sum
|
|
Next
|
|
|
|
Return noOne
|
|
End Function
|