大家好,我正在尝试在大小为 1000 的数组中随机生成“AZ”和“az”。我已经编写了随机生成大写字母的代码,即“AZ”,但是如何将小写字母也包含在其中?我对此很陌生,有人可以帮忙吗?
using namespace std;
int count(char vector[]);
void search(char vector[]);
int main()
{
char vector [1000];
char option;
srand (time(NULL));
for (int i=0; i<1000; i++)
{
vector[i] = rand() % 26 + 65;
cout << " " << vector[i];
}
cout << endl;
return 0;
}