[c++]随机数生成rand()

/ 1,128评论 / 4783阅读 / 0点赞

rand()

在以往的c/c++中生成随机数是使用rand()函数,但它也有一些使用的注意事项

头文件

#include <stdlib.h>

使用

随机数范围

需要srand()初始化种子

#include <time.h>
#include <stdlib.h>

int main() {
    srand(time(nullptr)); //初始化种子
    rand();               //获取随机数
    return 0;
}

多线程时

c++11_random

  1. Charlesflarm说道:

    https://stromectol.fun/# ivermectin where to buy

  2. Jamescix说道:

    furosemide 40mg: Buy Lasix No Prescription – buy furosemide online

  3. Charlesflarm说道:

    https://amoxil.cheap/# purchase amoxicillin online

  4. Stephenvew说道:

    http://amoxil.cheap/# amoxicillin 500 mg without prescription

  5. Davidham说道:

    zestril 10 mg price lisinopril 1.25 zestril price

  6. Jamescix说道:

    amoxicillin generic: amoxicillin 500mg capsules antibiotic – amoxicillin 500 tablet

  7. Charlesflarm说道:

    http://buyprednisone.store/# generic prednisone 10mg

  8. Charlesflarm说道:

    http://lisinopril.top/# lisinopril brand

  9. Jamescix说道:

    lasix: generic lasix – furosemide

  10. Hi there to all, for the reason that I am genuinely keen of reading this website’s post to be updated on a regular basis. It carries pleasant stuff.

  11. Davidham说道:

    zestoretic coupon lisinopril 5 mg zestril 5 mg price

  12. Charlesflarm说道:

    http://furosemide.guru/# lasix side effects

  13. Jamescix说道:

    buy stromectol canada: ivermectin rx – cost of ivermectin cream

  14. Charlesflarm说道:

    http://stromectol.fun/# ivermectin 3mg pill

  15. Leonardlex说道:

    lasix furosemide 40 mg: Buy Lasix – lasix 40 mg

  16. Jamescix说道:

    lasix dosage: Buy Lasix No Prescription – furosemide

  17. Stephenvew说道:

    http://buyprednisone.store/# prednisone 1 mg daily

  18. Davidham说道:

    furosemida 40 mg Buy Lasix No Prescription furosemide 40mg

  19. Charlesflarm说道:

    https://buyprednisone.store/# how can i order prednisone

  20. Jamescix说道:

    can you purchase amoxicillin online: buy amoxicillin online uk – buy amoxicillin over the counter uk

  21. Leonardlex说道:

    amoxicillin 800 mg price: how much is amoxicillin prescription – amoxicillin 500mg buy online canada

  22. Davidham说道:

    ivermectin 3mg tablets price stromectol ivermectin 3 mg ivermectin pill cost

  23. Jamescix说道:

    order lisinopril from mexico: lisinopril 100 mg – lisinopril 40mg prescription cost

  24. Charlesflarm说道:

    https://stromectol.fun/# ivermectin where to buy for humans

  25. Charlesflarm说道:

    https://furosemide.guru/# lasix furosemide

  26. Jamescix说道:

    amoxicillin for sale: amoxicillin 500 mg brand name – amoxicillin 775 mg

  27. Davidham说道:

    lasix furosemide Buy Lasix lasix 20 mg

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注