Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- prob = 75
- amount = 500
- --script
- tab = {}
- probb = 0
- for i=1,prob do
- table.insert(tab,i)
- end
- for i=1,amount do
- local randomnumber = math.random(1,100)
- local hecc = false
- for i=1,#tab do
- if tab[i] == randomnumber then
- hecc = true
- break
- end
- end
- if hecc == true then
- probb = probb + 1
- end
- end
- print(probb.." out of "..amount..", with an actual probability of: "..probb/amount.."%")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement