' 1. Даны 2 массива a и b каждый из 12 элементов.Найти R=pi*b(i)/a(max)
Function Zadanie20683579(A, B)
max = A(0)
for i = LBound(A, 1) To UBound(A, 1)
if max < A(i) then max = A(i)
next
R = 1
for i = LBound(B, 1) To UBound(B, 1)
r = r * B(i)
next
Zadanie20683579 = r / max
End Function
Function RandomArray(n, max)
ReDim A(n)
Randomize
for i = LBound(A, 1) To UBound(A, 1)
A(i) = max * Rnd
next
RandomArray = A
End Function
Msgbox Zadanie20683579(RandomArray(12, 50), RandomArray(12, 50))