Private Sub Command1_Click()
mx = f(-4)
mn = f(-4): kmn = -4
For i = -4 To 4
If mx < f(i) Then mx = f(i)
If mn > f(i) Then
mn = f(i): kmn = i
End If
Next i
MsgBox "y(max)=" & mx & vbCr & "x_y(min)=" & kmn, vbInformation
End Sub
Function f(x)
f=((X+1)/(x ^ 2 - 2)) ^ (0.5/1)
End Function
На Visual basic