int a, b, c;
bool x = false;
public int mxNum;
public int FinNum;
int count = 0;
int num;
int[] array = new int[25]{
306,307,308,309,310,311,312,313,314,
415,405,406,407,408,409,410,411,412,413,
105,106,107,108,109,110};
void Start()
{
if (array.Length % 5 == 0)
{
//排序
for (int i = 0; i < array.Length; i++)
{
for (int j = i + 1; j < array.Length; j++)
{
if (array[j] % 100 > array[i] % 100)
{
mxNum = array[j];
array[j] = array[i];
array[i] = mxNum;
}
if (array[j] % 100 == array[i] % 100)
{
if (array[j] > array[i])
{
FinNum = array[j];
array[j] = array[i];
array[i] = FinNum;
}
}
}
}//排好序了
print("array.Length/5="+array.Length/5);
/*for (int i = 0; i < array.Length; i++)
{
print("顺序是:---" + array[i]);
}*/
//有(array.Length/5)个3带2 =1 2 3 .....
for (int l = 0; l < array.Length - 2; l++)
{
//a = array[l];
//b = array[l + 1];
//print("a:--->>>" + a);
//print("b:--->>>" + b);
if (array[l] % 100 == array[l + 1]%100)
{
num = array[l];
print("num:--->>>" + num);
}
else
{
print("num:>>>" + num);
}
if (num % 100 == array[l + 2] % 100)
{
count++;
print("count:--->>" + count);
}
else
{
print("count:>>>" + count);
}
if (count > 0 && count == array.Length / 5)
{
x = true;
}
else
{
x = false;
}
print("x:--->" + x);
}
}
}