Complete the VBA procedure lines below that are required to calculate f(z) using the following equation for values of z ? [-3, 12] in steps of 0.75.
f(x) = 2 - 5z², -3 ? z ? 0
f(z) = z³ + 2, 0 ? z ? 3
f(z) = 38 - z², 3 ? z ? 12
Sub MTQ()
Dim x As Double
Dim i
Dim F(1 To 21)
i = 1
For
-3
12
(x >= -3 And x <= 0)
F(i) = 2 - 5 * (x^2)
(x >= 0 And x <= 3)
F(i) = (x^3) + 2
F(i) = 38 - (x^2)
i = i + 1
End Sub
(a) Drag the choices provided below in the correct boxes to complete the VBA procedure.
(b) What is the value of F(17) after this VBA procedure is executed? Drag the correct choice into the box below.
F(17)
As String
As Double
As Date
As Currency
As Integer
Else
End If
ElseIf
End
Next
Step
To
If
Then
0
-18
10
13
0.5
-43
6
29
0.25
25
3
75
0.75
50
-3
2
22