每次生成的随机数都是一样的 为什么
#include<stdlib.h>#include<time.h>
using namespace std;
int main() {
for (int i = 0; i <= 8; i++) {
for (int j = 0; j <= 8; j++) {
unsigned srand(time(0));
int t = rand() % 101;
cout << t << '\t';
}
cout << endl;
}
return 0;
}