using System;
namespace CSharp_Shell
{
public static class Program
{
public static void Main()
{
string[] z = { “中”, “国”, “人”, “民”, “大”, “家” , “好” }; // 您可以替换为您想要的汉字
Console.Write("\n输出随机中文汉字组合\n");
Random random = new Random();
for (int i = 0; i < 2; i++)
{
for (int j = 0; j < 2; j++)
{
for (int k = 0; k < 2; k++)
{
Console.Write("{0}{1}{2}{3}{4}\n",
z[random.Next(z.Length)],
z[random.Next(z.Length)],
z[random.Next(z.Length)],
z[random.Next(z.Length)],
z[random.Next(z.Length)]);
}
}
}
}
}
}