|
tossing coin, logic problem ?
for (int i=0; i<100; i++)
{
if(toss()>=1)
head++;
else
tail++;
}
bool toss()
{
srand(time(0));
return rand()%2;
}
logic problem ? i cant figure out the problem. can somebody tell me the what happened ?
why i stil get the same result each time i call the toss function ?
|