Hi Guys
How can i generate a integer number between 0 and 26 based on probability by using C++. can you show me an example please.
I have probablity for each number in an array
prob[ 26] = { 0.1 , 0 2. 0.01, 0 , 0.25 , 0 , 0 , 0.20.02,0,0,0,0,0,0,0,0,0,0, 0,0 , 0.23 }
the example array above.
Thanks
How can i generate a integer number between 0 and 26 based on probability by using C++. can you show me an example please.
I have probablity for each number in an array
prob[ 26] = { 0.1 , 0 2. 0.01, 0 , 0.25 , 0 , 0 , 0.20.02,0,0,0,0,0,0,0,0,0,0, 0,0 , 0.23 }
the example array above.
Thanks
Last edited: