VBA:
Sub P()
Dim x As Double, y As Double
x = Val(InputBox("x = "))
If x <= 0 Then
y = Sin(2 * x)
ElseIf x <= 10 Then
y = Tan(x)
Else: y = 0.33 * x
End If
MsgBox (" Y = " & y)
End Sub
VBA:
Sub P()
Dim x As Double, y As Double
x = Val(InputBox("x = "))
If x <= 0 Then
y = Sin(2 * x)
ElseIf x <= 10 Then
y = Tan(x)
Else: y = 0.33 * x
End If
MsgBox (" Y = " & y)
End Sub