Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,27 +0,0 @@
|
|||
#AutoIt Version: 3.2.10.0
|
||||
$n0 = 0
|
||||
$n1 = 1
|
||||
$n = 10
|
||||
MsgBox (0,"Iterative Fibonacci ", it_febo($n0,$n1,$n))
|
||||
|
||||
Func it_febo($n_0,$n_1,$N)
|
||||
$first = $n_0
|
||||
$second = $n_1
|
||||
$next = $first + $second
|
||||
$febo = 0
|
||||
For $i = 1 To $N-3
|
||||
$first = $second
|
||||
$second = $next
|
||||
$next = $first + $second
|
||||
Next
|
||||
if $n==0 Then
|
||||
$febo = 0
|
||||
ElseIf $n==1 Then
|
||||
$febo = $n_0
|
||||
ElseIf $n==2 Then
|
||||
$febo = $n_1
|
||||
Else
|
||||
$febo = $next
|
||||
EndIf
|
||||
Return $febo
|
||||
EndFunc
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
#AutoIt Version: 3.2.10.0
|
||||
$n0 = 0
|
||||
$n1 = 1
|
||||
$n = 10
|
||||
MsgBox (0,"Recursive Fibonacci ", rec_febo($n0,$n1,$n))
|
||||
Func rec_febo($r_0,$r_1,$R)
|
||||
if $R<3 Then
|
||||
if $R==2 Then
|
||||
Return $r_1
|
||||
ElseIf $R==1 Then
|
||||
Return $r_0
|
||||
ElseIf $R==0 Then
|
||||
Return 0
|
||||
EndIf
|
||||
Return $R
|
||||
Else
|
||||
Return rec_febo($r_0,$r_1,$R-1) + rec_febo($r_0,$r_1,$R-2)
|
||||
EndIf
|
||||
EndFunc
|
||||
Loading…
Add table
Add a link
Reference in a new issue