Sub abc()
Dim i As Integer, aMax As Integer, aMin As Integer, n As Integer
n = 15
ReDim a(1 To n) As Integer
For i = 1 To n
a(i) = InputBox("Введи A[" & Str(i) & " ] как целое")
Next i
aMax = a(1)
aMin = a(1)
For i = 2 To n
If a(i) > aMax Then aMax = a(i)
If a(i) < aMin Then aMin = a(i)
MsgBox "Сумма max+min =" & Str(aMax + aMin) & _
" их разность =" & Str(aMax - aMin)
End Sub
Sub abc()
Dim i As Integer, aMax As Integer, aMin As Integer, n As Integer
n = 15
ReDim a(1 To n) As Integer
For i = 1 To n
a(i) = InputBox("Введи A[" & Str(i) & " ] как целое")
Next i
aMax = a(1)
aMin = a(1)
For i = 2 To n
If a(i) > aMax Then aMax = a(i)
If a(i) < aMin Then aMin = a(i)
Next i
MsgBox "Сумма max+min =" & Str(aMax + aMin) & _
" их разность =" & Str(aMax - aMin)
End Sub