Advertisement
LuaGamer

ВОТЪ ВАМ

Sep 17th, 2016
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.34 KB | None | 0 0
  1. local next
  2. do
  3.   local i = 1
  4.   local pf = 1
  5.   local ppf = 1
  6.   function next()
  7.     local result
  8.     if i <= 2 then
  9.       result = 1
  10.     else
  11.       result = pf + ppf
  12.     end
  13.     i = i + 1
  14.     ppf = pf
  15.     pf = result
  16.     return result
  17.   end
  18. end
  19.  
  20.  t = {}
  21.  for i = 1, 10
  22.   do
  23.    t[i] = next()
  24.   end
  25.  var = t [7]
  26.  print (var)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement