Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
23
Task/Anonymous-recursion/AutoHotkey/anonymous-recursion.ahk
Normal file
23
Task/Anonymous-recursion/AutoHotkey/anonymous-recursion.ahk
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
Fib(n) {
|
||||
nold1 := 1
|
||||
nold2 := 0
|
||||
If n < 0
|
||||
{
|
||||
MsgBox, Positive argument required!
|
||||
Return
|
||||
}
|
||||
Else If n = 0
|
||||
Return nold2
|
||||
Else If n = 1
|
||||
Return nold1
|
||||
Fib_Label:
|
||||
t := nold2+nold1
|
||||
If n > 2
|
||||
{
|
||||
n--
|
||||
nold2:=nold1
|
||||
nold1:=t
|
||||
GoSub Fib_Label
|
||||
}
|
||||
Return t
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue