I am trying to solve a problem in which when a particle is launched it has 3 possibilities: 1 - It is absorbed by the plate 2 - It bounces 3 - It crosses
The formulas of the movement of the particle are made by using a random number (rand()) the case is that I have to enumerate the times that this happens with 1000 particles, although when putting it in a loop, it does not generate a number 1000 times different, that is to say 1 for each iteration but it generates one and uses it for the "1000 launches" so the counter results are either 1000 in one or 1000 in another or a random number between 150 and 250 from what I have seen (another thing I really don't understand)
How could I go about solving this?
Thank you very much in advance and I leave the code here.