If ((a = 1 And b = 7) Or (a = 7 And b = 1)) And p(1) <= p(7) Then z(1) = 7: z(2) = 6: z(3) = 2: z(4) = 5: z(5) = 4: z(6) = 1
If ((a = 1 And b = 7) Or (a = 7 And b = 1)) And p(1) > p(7) Then z(1) = 1: z(2) = 4: z(3) = 5: z(4) = 2: z(5) = 6: z(6) = 7
Worksheets("Лист3").Cells(min1(a, b) + 19, max1(a, b) + 8) = "+"
s = 0
If p(a) <= p(b) And a <= b Then
If p(z(1)) - n(z(1), z(2)) = p(z(2)) Then Worksheets("Лист3").Cells(min(z(1), z(2)) + 19, max(z(1), z(2)) + 8) = "-": s = s + 1
If p(z(1)) + n(z(1), z(2)) = p(z(2)) Then Worksheets("Лист3").Cells(min(z(1), z(2)) + 19, max(z(1), z(2)) + 8) = "+"
If p(z(2)) - n(z(2), z(3)) = p(z(3)) Then Worksheets("Лист3").Cells(min(z(2), z(3)) + 19, max(z(2), z(3)) + 8) = "-": s = s + 1
If p(z(2)) + n(z(2), z(3)) = p(z(3)) Then Worksheets("Лист3").Cells(min(z(2), z(3)) + 19, max(z(2), z(3)) + 8) = "+"
If p(z(3)) - n(z(3), z(4)) = p(z(4)) Then Worksheets("Лист3").Cells(min(z(3), z(4)) + 19, max(z(3), z(4)) + 8) = "-": s = s + 1
If p(z(3)) + n(z(3), z(4)) = p(z(4)) Then Worksheets("Лист3").Cells(min(z(3), z(4)) + 19, max(z(3), z(4)) + 8) = "+"
If p(z(4)) - n(z(4), z(5)) = p(z(5)) Then Worksheets("Лист3").Cells(min(z(4), z(5)) + 19, max(z(4), z(5)) + 8) = "-": s = s + 1
If p(z(4)) + n(z(4), z(5)) = p(z(5)) Then Worksheets("Лист3").Cells(min(z(4), z(5)) + 19, max(z(4), z(5)) + 8) = "+"
If p(z(5)) - n(z(5), z(6)) = p(z(6)) Then Worksheets("Лист3").Cells(min(z(5), z(6)) + 19, max(z(5), z(6)) + 8) = "-": s = s + 1
If p(z(5)) + n(z(5), z(6)) = p(z(6)) Then Worksheets("Лист3").Cells(min(z(5), z(6)) + 19, max(z(5), z(6)) + 8) = "+"
End If
If p(a) > p(b) And a <= b Then
If p(z(1)) - n(z(1), z(2)) = p(z(2)) Then Worksheets("Лист3").Cells(min(z(1), z(2)) + 19, max(z(1), z(2)) + 8) = "+"
If p(z(1)) + n(z(1), z(2)) = p(z(2)) Then Worksheets("Лист3").Cells(min(z(1), z(2)) + 19, max(z(1), z(2)) + 8) = "-": s = s + 1
If p(z(2)) - n(z(2), z(3)) = p(z(3)) Then Worksheets("Лист3").Cells(min(z(2), z(3)) + 19, max(z(2), z(3)) + 8) = "+"
If p(z(2)) + n(z(2), z(3)) = p(z(3)) Then Worksheets("Лист3").Cells(min(z(2), z(3)) + 19, max(z(2), z(3)) + 8) = "-": s = s + 1
If p(z(3)) - n(z(3), z(4)) = p(z(4)) Then Worksheets("Лист3").Cells(min(z(3), z(4)) + 19, max(z(3), z(4)) + 8) = "+"
If p(z(3)) + n(z(3), z(4)) = p(z(4)) Then Worksheets("Лист3").Cells(min(z(3), z(4)) + 19, max(z(3), z(4)) + 8) = "-": s = s + 1
If p(z(4)) - n(z(4), z(5)) = p(z(5)) Then Worksheets("Лист3").Cells(min(z(4), z(5)) + 19, max(z(4), z(5)) + 8) = "+"
If p(z(4)) + n(z(4), z(5)) = p(z(5)) Then Worksheets("Лист3").Cells(min(z(4), z(5)) + 19, max(z(4), z(5)) + 8) = "-": s = s + 1
If p(z(5)) - n(z(5), z(6)) = p(z(6)) Then Worksheets("Лист3").Cells(min(z(5), z(6)) + 19, max(z(5), z(6)) + 8) = "+"
If p(z(5)) + n(z(5), z(6)) = p(z(6)) Then Worksheets("Лист3").Cells(min(z(5), z(6)) + 19, max(z(5), z(6)) + 8) = "-": s = s + 1
End If
If p(a) <= p(b) And a > b Then
If p(z(1)) - n(z(1), z(2)) = p(z(2)) Then Worksheets("Лист3").Cells(max(z(1), z(2)) + 19, min(z(1), z(2)) + 8) = "-": s = s + 1
If p(z(1)) + n(z(1), z(2)) = p(z(2)) Then Worksheets("Лист3").Cells(max(z(1), z(2)) + 19, min(z(1), z(2)) + 8) = "+"
If p(z(2)) - n(z(2), z(3)) = p(z(3)) Then Worksheets("Лист3").Cells(max(z(2), z(3)) + 19, min(z(2), z(3)) + 8) = "-": s = s + 1
If p(z(2)) + n(z(2), z(3)) = p(z(3)) Then Worksheets("Лист3").Cells(max(z(2), z(3)) + 19, min(z(2), z(3)) + 8) = "+"
Уважаемый посетитель!
Чтобы распечатать файл, скачайте его (в формате Word).
Ссылка на скачивание - внизу страницы.