A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
|
|
@ -0,0 +1,11 @@
|
|||
set fibs to {}
|
||||
set x to (text returned of (display dialog "What fibbonaci number do you want?" default answer "3"))
|
||||
set x to x as integer
|
||||
repeat with y from 1 to x
|
||||
if (y = 1 or y = 2) then
|
||||
copy 1 to the end of fibs
|
||||
else
|
||||
copy ((item (y - 1) of fibs) + (item (y - 2) of fibs)) to the end of fibs
|
||||
end if
|
||||
end repeat
|
||||
return item x of fibs
|
||||
Loading…
Add table
Add a link
Reference in a new issue