Chances with percentage
#3

Make random of 10 numbers and in the if statement check only 1 number like this
PHP код:
new rand random(11); //random 11 because it will only have 10 numbers.
if(rand == 1//if the random result is 1 or what ever number you like
{
         
//Do some thing here

We get random of 10 numbers but we check if the random results 1 that means 1 out of 10
EDIT: Marcel was fast || Ok random of 11
Reply


Messages In This Thread
Chances with percentage - by AndreiWow - 04.01.2017, 12:28
Re: Chances with percentage - by BiosMarcel - 04.01.2017, 12:40
Re: Chances with percentage - by coool - 04.01.2017, 12:40
Re: Chances with percentage - by AndreiWow - 04.01.2017, 12:51
Re: Chances with percentage - by coool - 04.01.2017, 12:54
Re: Chances with percentage - by BiosMarcel - 04.01.2017, 12:55
Re: Chances with percentage - by AndreiWow - 04.01.2017, 13:06
Re: Chances with percentage - by BiosMarcel - 04.01.2017, 13:10
Re: Chances with percentage - by GoldenLion - 04.01.2017, 13:10
Re: Chances with percentage - by SyS - 04.01.2017, 13:13

Forum Jump:


Users browsing this thread: 2 Guest(s)