生成随机数字+字符串
2019-04-24 本文已影响0人
Jianbaozi
#include<string>
#include<random>
#include<ctime>
using namespace std;
int main() {
srand((unsigned)time(NULL));
string s = "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
for (int i = 0; i < 10; ++i) {
for (int i = 0; i < 10; ++i) {
string s2;
s2.push_back(s[rand() % 52]);
cout << s2;
}
cout << endl;
}
system("pause");
return 0;
}