Skip to content

Instantly share code, notes, and snippets.

@JanneSalokoski
Created April 18, 2014 07:31
Show Gist options
  • Save JanneSalokoski/11029478 to your computer and use it in GitHub Desktop.
Save JanneSalokoski/11029478 to your computer and use it in GitHub Desktop.
require "android"
require "socket"
io.read()
function main()
local run = true
local i, j = 10000, 99999
while run do
local x = math.random(i, j) .. "-" .. math.random(i, j)
local y = math.random(i, j) .. "-" .. math.random(i, j)
local z = math.random(i, j) .. "-" .. math.random(i, j)
io.write("x: " .. x .. " ")
io.write("y: " .. y .. " ")
io.write("z: " .. z .. " ")
io.write("\n")
if x == y and y == z then
run = false
print("Match found: ")
print(" x: " .. x)
print(" y: " .. y)
print(" z: " .. z)
io.write("Press any key to exit: "); io.read()
else
run = true
end
end
end
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment