📜  c++ 随机数 - C++ 代码示例

📅  最后修改于: 2022-03-11 14:44:46.917000             🧑  作者: Mango

代码示例6
#include
#include
using namespace std;
//Generate random numbers
int main(){
    srand(time(0));
    for (int i = 0;  i < 10; i++){
        cout<< (rand() % 10) + 1<<" ";