Advertisement
VikeStep

Combinations

Sep 22nd, 2013
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.85 KB | None | 0 0
  1. local file = io.open("listOfCombinations.txt","a")
  2. file:write("List of Combinations")
  3. for a = 0, 65 do
  4.     fooa = (1.15^a)-1
  5.     for b = 0, 52 do
  6.         foob = fooa+((20/3)*((1.15^b)-1))
  7.         if foob < 10000 then
  8.         for c = 0, 40 do
  9.             fooc = foob + ((100/3)*((1.15^c)-1))
  10.             if fooc < 10000 then
  11.             for d = 0, 28 do
  12.                 food = fooc + ((200)*((1.15^d)-1))
  13.                 if food < 10000 then
  14.                 for e = 0, 19 do
  15.                     fooe = food + ((2000/3)*((1.15^e)-1))
  16.                     if fooe < 10000 then
  17.                     for f = 0, 11 do
  18.                         foof = fooe + ((8000/3)*((1.15^f)-1))
  19.                         if foof < 10000 then
  20.                         for g = 0, 4 do
  21.                             foog = foof + ((40000/3)*((1.15^g)-1))
  22.                             if foog < 10000 then
  23.                                 file:write("\n"..a..", "..b..", "..c..", "..d..", "..e..", "..f..", "..g)
  24.                             end
  25.                         end
  26.                         end
  27.                     end
  28.                     end
  29.                 end
  30.                 end
  31.             end
  32.             end
  33.         end
  34.         end
  35.     end
  36. end
  37. file:close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement