Random R = new Random(); double randomRate = 0; 6
for (int i = 0; i < 10; i++) 7
{ 8
int Max = R.Next(1, Int16.MaxValue); 9
for (int j = 0; j < 10; j++) 10
{ 11
int N = R.Next(1, Max); 12
List list = Program.GetRandomNum(Max, N); 13
double rate = VerRandomRate(list, Max); 14
randomRate += Math.Abs(rate); 15
Console.Write("Max:{0}, N:{1},Variance:{2}\r\n", Max, N, rate); 16
System.Threading.Thread.Sleep(50); 17
} 18
} 19
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/