2 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for cool_zephyr

hey i'm trying to generate numbers from 1 to 3 in a way such that number 1 has the probability 70% being generated number 2 has the probability of 20% of being generated number 3 has the probability of 10% of being generated how do i do that?? can anyone …

Member Avatar for cool_zephyr
0
206
Member Avatar for jongiambi

Hi im writing a program to simulate a slot machine, where a user enteres a coin and has a 70% chance of winning (say 3 coins). Anyways, I have a class slotMachine with a public int random() function. Here is the function: int slotMachine::random() { srand( time(NULL)); randomNum = rand() …

Member Avatar for KaeLL
0
434

The End.