Possibilities
#1

Hey,
Can I make possibilities using this:
pawn Код:
new number = random(100);

if(number == 1)
{
//do something
}
So there would be 1/100 possibility to execute //do something
Would that work?
Reply
#2

Maybe test yourself:
pawn Код:
new number = random(3);

if(number == 1)
{
print("1");
}
else if(number == 2)
{
print("2");
}
.....
Reply
#3

Quote:
Originally Posted by Scott[LT
]
Maybe test yourself:
pawn Код:
new number = random(3);

if(number == 1)
{
print("1");
}
else if(number == 2)
{
print("2");
}
.....
Wouldn't it be easier to say just "Yes" or "No"
Thanks anyway.. I'll try...
Reply
#4

It wouldn't be easier, because I don't know correct answer, and I can't use pawno right now, I am using mobile.
Reply
#5

yes it'll work.
Reply
#6

Код:
main{
 while(random(0)+1){
  printf("%d",random(10000000));
 }
}
It seems not very "random"
Reply
#7

Quote:
Originally Posted by yezizhu
Код:
main{
 while(random(0)+1){
  printf("%d",random(10000000));
 }
}
It seems not very "random"
wtf where did you get this code? ><
it's pointless random(0)+1
Reply
#8

Quote:
Originally Posted by °ғαιιοцт°
Quote:
Originally Posted by yezizhu
Код:
main{
 while(random(0)+1){
  printf("%d",random(10000000));
 }
}
It seems not very "random"
wtf where did you get this code? ><
it's pointless random(0)+1
This will tell you how "unrandom" random() function is : p
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)