Why does C++ rand() seem to generate only numbers of the same order of magnitude?

前端 未结 9 2066
孤独总比滥情好
孤独总比滥情好 2021-01-30 01:14

In a small application written in C/C++, I am facing a problem with the rand function and maybe the seed :

I want to produce a sequence of random numbers th

9条回答
  •  情歌与酒
    2021-01-30 01:48

    If you want to use random numbers from an online service you can use wget for that, you may want to see you can also use services like random.org for your random number generation , you can catch them using wget and then reading the numbers from the downloaded file

    wget -q https://www.random.org/integers/?num=100&min=1&max=100&col=5&base=10&format=html&rnd=new -O new.txt
    

    http://programmingconsole.blogspot.in/2013/11/a-better-and-different-way-to-generate.html

提交回复
热议问题