
498 Views
247 Executions
Does it work?
No reports yetNo reports yet. Tried it? Be the first to say.
Also noticed:
Description
Generates 3 random numbers between 1 and 100, if all 3 are the same then it's a jackpot
-- [[ WARNING ]]
-- Your console will be filled with outputs.
for i = 1, 1000 do
local firstNumber = math.random(1, 100)
local secondNumber = math.random(1, 100)
local thirdNumber = math.random (1, 100)
if firstNumber == secondNumber and secondNumber == thirdNumber then
warn(string.format("Jackpot!! %d, %d, %d", firstNumber, secondNumber, thirdNumber))
else
print(string.format("Maybe next time. %d, %d %d", firstNumber, secondNumber, thirdNumber))
end
end
Comments
0Log in to join the conversation. Login
No comments yet. Be the first!








