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
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
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