I would like to add to this random function a parameter which represent odds of returning true for example rand_num(80) will give 80% odds of returning true.
bool rand_num()             // randomize 0 or 1
{
int result =0;
srand(time(NULL));
result = (rand()%2);
return result;
}   
Thanks.
 
     
     
    