c语言我给数组赋值的随机数显示不出来,显示无,代码可以运行
int main()
{
char ch;
char str[51] = "";
int i;
time_t start_time, end_time;
while (1)
{
system("cls");
help();
ch = _getch();
srand((unsigned int)time(NULL));
for (i = 0; i < 50; i++);
{
str[i] = rand() % 26 + 'a';
}
str[50] = '\0';
printf("%s\n", str);
}
return 0;
}