#include<iostream>
#include<string>
#include<algorithm>
#include<ctime>
using namespace std;
const int INF = 1e9;
int main() {
//设置种子
srand((unsigned)time(NULL));
//可随机生成0-10以内的数
int t = rand() % 10;
cout << t << endl;
}
标签:10,int,c++,生成,随机数,include
From: https://www.cnblogs.com/dengch/p/17717027.html