》。。。有人回复一下吧 看过的回复一下吧,站长帮帮忙
不能,不屑就生成一样的数字了
可以不写吗
随机种子
srand(time(0));这是啥?
谢谢站长
#include <bits/stdc++.h> using namespace std; int main(){ srand(time(0)); cout << rand()%100+1; //[1~100]的随机数 return 0; }
共 6 条回复
不能,不屑就生成一样的数字了
可以不写吗
随机种子
srand(time(0));这是啥?
谢谢站长