Pushok

inform. gia fast answer

Mar 7th, 2011
316
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.51 KB | None | 0 0
  1. app = {
  2.     function(a)
  3.         return tonumber(tostring(a)..'2')
  4.     end,
  5.     function(a)
  6.         if a == 0 or a == nil then return 0 end
  7.         return tonumber(a) / 2
  8.     end
  9. }
  10.  
  11. math.randomseed(os.time())
  12. math.random()
  13.  
  14. num = 1
  15. function GetNum()
  16.     while true do
  17.         str = ""
  18.         num = 1
  19.         for i=1,5 do
  20.             if math.random(1,2) == 1 or i == 1 then
  21.                 str = str.."WR2\n"
  22.                 num = app[1](num)
  23.             else
  24.                 str = str.."delim\n"
  25.                 num = app[2](num)
  26.             end
  27.  
  28.             if(num == 16) then print(str) return end
  29.         end
  30.     end
  31. end
  32.  
  33. GetNum()
Advertisement
Add Comment
Please, Sign In to add comment