用对话框输入x的值,根据下列函数计算y的值,并在窗体上输出y的值。要求使用Select Case语句。
Private Sub Command 1_Click()
Dim x, y As Single
X=InputBox(“Input x=”)
Select Case x
Case Is>=4, Is<1
y = x * x + 4 * x
Case 3 To 4
y = Sqr(x * x + 1)
Case 2 To 3
y = 2 * Sin(x) + 1
Case 1 To 2
y = 3 * x - 7
End Select
Print “x=”; x; “y=”; yEnd Sub