日期:2014-05-18 浏览次数:20872 次
public string _35选7() { //Randomize (Time) long[] a = new long[8];//Dim a(8) As Long int i, j; //Dim i As Integer, j As Integer for (int i = 0; i < 7; i++) { a[i] = (int)(Rnd() * 35 + 1); for (int j = 0; j < i; j++) { if (a(i) == a(j)) { i = i - 1; continue; } } } }
------解决方案--------------------
这是要算彩票?
------解决方案--------------------
void test()
{
Randomize (Time);
long[] a =new long[8];
int i,j;
for (i=1;i<=7;i++)
{
a[i] = Int(Rnd() * 35 + 1);
for (j = 0; i <= i - 1; )
{
if (a[i] == a[j])
{
i = i - 1;
}
}
}
}
}
}
------解决方案--------------------
不得不承认,我老了。。。