15.10.2010, 19:11
I was just messing around with a few functions the other day and i thought id test how random random is lol so i made an infinite loop placed it in the funtion main (as i dont have gta on this pc) and i get some wierd results maybe im doing some realy stupid mistake but i can't see it. Someone might see whats wrong here it is.
And the results
To my knowledge the maximum number should be 2.
pawn Код:
#include <a_samp>
main()
{
new value;
for(;;)
{
value = random(2);
printf("%d",value);
}
}
Код:
[20:10:50] 2 [20:10:50] 3 [20:10:50] 5 [20:10:50] 7 [20:10:50] 11 [20:10:50] 13 [20:10:50] 17 [20:10:50] 19 [20:10:50] 23 [20:10:50] 29 [20:10:50] 31 [20:10:50] 37 [20:10:50] 41 [20:10:50] 43 [20:10:50] 47 [20:10:50] 53 [20:10:50] 59 [20:10:50] 61 [20:10:50] 67 [20:10:50] 71 [20:10:50] 73 [20:10:50] 79 [20:10:50] 83 [20:10:50] 89 [20:10:50] 97