c++生成随机数 math
时间: 2023-10-18 09:56:58 浏览: 109
C++生成随机数
生成随机数在C语言中可以使用rand()函数和srand()函数。rand()函数只返回一个伪随机数,而生成随机数之前必须先调用srand()函数来设置种子。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* *3* [C++随机数生成](https://blog.csdn.net/QtCompany/article/details/130014222)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 100%"]
[ .reference_list ]
阅读全文