#include<iostream>
#include<string>
#include<random>
#include<ctime>
using namespace std;
int main() {
srand(time(NULL));
for (int i = 0; i < 5; ++i) {
string s;
for (int i = 0; i < 10; ++i) {
switch (rand() % 3)
{
case 0:s = s + char(rand() % 26 + 'a'); break;
case 1:s = s + char(rand() % 26 + 'A'); break;
case 2:s = s + char(rand() % 10 + '0'); break;
}
}
cout << s << endl;
}
system("pause");
return 0;
}
网友评论