Hi, suppose i want to run a loop that involves an object(real-life meaning)
that chooses two directions: one of the directions returns back to the original position, while the other direction has two probabilities associated with it:
e.g. 1/3 chance the loop will end, and 2/3 chance it will return to original position..
my question is how do i program this or what to put in the body of the loop?
i've never done any probability stuff in c++ so i am confused on how to do this.. does it involve rand()?