How can i generate a random boolean with probability (1 to 100) in C?

后端 未结 0 792
醉梦人生
醉梦人生 2020-12-23 22:47

I need a function that generates a random boolean with a given probability from 1 to 100.

I\'ve tried with this:

int randProb(int chance, int min, int          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题