namespace ConsoleApp1
{
internal class Program
{
static void Main(string[] args)
{
Console.WriteLine(MakeNickName(6));
}
public static string MakeNickName(int sizeNick)
{
char[] male =
{'b', 'c', 'd', 'f',
'g','h','j','k',
'l','m','n','p',
'r','s','t','v',
'w', 'x', 'z'};
char[] female =
{'a','e','i','o' ,
'q','u','y',};
int maleOrFemale = new Random().Next(0, 2);
bool maleNow = false;
if (maleOrFemale == 0)
{
maleNow = true;
}
else
{
maleNow = false;
}
string nickName = "";
for (int i = 0; i < sizeNick; i++)
{
if (maleNow)
{
maleNow = false;
nickName += male[new Random().Next(0, male.Length)];
}
else
{
maleNow = true;
nickName += female[new Random().Next(0, female.Length)];
}
if (i == 0)
{
nickName = nickName.ToUpper();
}
}
return nickName;
}
}
}