Во вложении - файл с рабочей книгой MS Excel 2003.
Соответствующие макросы находятся на листах.
Sub abcd()
Dim so As Double, pp As Double, z As Double
so = 0: pp = 1: no = 0: np = 0
For i = 1 To 8
x = Cells(1, i + 1)
For y = -5 To 5 Step 2
z = x * y / (x ^ 2 + y ^ 2)
If z < 0 Then
so = sp + z
no = np + 1
Else
If z > 0 Then
pp = pp * z
np = np + 1
End If
End If
Next y
Next i
Cells(2, 5) = so / no
Cells(3, 5) = pp ^ (1 / np)
End Sub
Sub Ex26()
Dim a As Double, c As Double
For i = 1 To 6
a = Cells(1, i + 1)
c = Application.WorksheetFunction.Max(Abs(a), Abs(Cells(2, i + 1)))
m = 2 * a / (c * Exp(6))
Cells(3, i + 1) = m
Next i
End Sub
Скачать вложение Excel (XLS)