标签:
Console.Write("您欲得到四位随机验证码的数量是:");
int a = int.Parse(Console.ReadLine());
Console.WriteLine("随机验证码依次为:");
char[] arr = new char[] {‘1‘,‘2‘,‘3‘,‘4‘,‘5‘,‘6‘,‘7‘,‘8‘,‘9‘,‘a‘,‘b‘,‘c‘,‘d‘,‘e‘,‘f‘,
‘g‘,‘h‘,‘i‘,‘j‘,‘l‘,‘m‘,‘n‘,‘o‘,‘p‘,‘q‘,‘r‘,‘s‘,‘t‘,‘u‘,‘v‘,‘w‘,‘x‘,‘y‘,‘z‘ };
for (int c = 1;c <= a; c++)
{
string str1 = string.Empty;
for (int d = 1; d <= 4; d++)
{
Random b = new Random();
Thread.Sleep(500);
int e = b.Next(0,34);
str1 += arr[e];
}
Console.WriteLine(str1);
}
Console.WriteLine("程序运行结束!谢谢使用");
Console.ReadLine();
标签:
原文地址:http://www.cnblogs.com/whytohow/p/4712283.html