Курсовая работа: Разработка средства функционального диагностирования вычислительных устройств
int d2b, d1, d3, bs1, tail, head, m, m1;
d2b = 8*n-5*k-3;
d1 = (n-k)*2;
d3 = n-k-3;
bs1= n/4–2;
StringGrid2->Cells[1] [5] = d2b;
StringGrid2->Cells[1] [6] = d2b+1;
for (int i=2; i<StringGrid2->ColCount; i++) {
StringGrid2->Cells[i] [5] = StringGrid2->Cells [i-1] [5]+2;
StringGrid2->Cells[i] [6] = StringGrid2->Cells[i] [6]+2;
}
StringGrid2->Cells[bs1] [1] = n – 3;
StringGrid2->Cells[bs1] [2] = n – 2;
StringGrid2->Cells[bs1] [3] = n – 1;
StringGrid2->Cells[bs1] [4] = n;
for (int i=(bs1–1); i>d2b; i–)
for (int j=0; j<4; j++)
StringGrid2->Cells[i] [j] = StringGrid2->Cells [i+1] [j] – 4;
IF1 (StringGrid2, d1+2, d1, d3–2);
tail+=2;
head+=2;
IF1 (StringGrid2, d1+2, d1, d3–2);
if (n % 2 == 1) {
StringGrid2->Cells [head+2] [1] = StringGrid2->Cells[head] [6];
StringGrid2->Cells [head+2] [2] = StringGrid2->Cells[head] [5];
StringGrid2->Cells [head+2] [3] = StringGrid2->Cells [d3+1] [6];
StringGrid2->Cells [head+2] [4] = StringGrid2->Cells [d3+1] [5];
}
tail= d3;