采用rand()函数生成

#define N  999 //精度为小数点后面3位
srand((unsigned)time(NULL));//使得每次启动程序的随机数不同 rand() % (N + 1) / (float)(N + 1);

 

相关文章:

  • 2021-09-24
  • 2021-10-01
  • 2021-09-19
  • 2022-01-05
  • 2022-12-23
  • 2021-09-02
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-19
  • 2021-08-11
  • 2022-01-05
  • 2022-12-23
相关资源
相似解决方案