作业帮 > 综合 > 作业

vb编程象限判断!声明字符与声明的数据类型不符 帮我指出哪里不对啊

来源:学生作业帮 编辑:大师作文网作业帮 分类:综合作业 时间:2024/11/20 15:10:27
vb编程象限判断!声明字符与声明的数据类型不符 帮我指出哪里不对啊
Private Sub Command1_Click()
x = InputBox("请输入x的值")
y = InputBox("请输入y的值")
If x = 0 Then
Print "点(" & x & "," & y & ")" & "位于y轴上"
Exit Sub
End If
If y = 0 Then
Print "点(" & x & "," & y & ")" & "位于x轴上"
Exit Sub
End If
If Sgn(x) = 1 And Sgn(y) = 1 Then
Print "点(" & x & "," & y & ")" & "位于第一象限"
Exit Sub
End If
If Sgn(x) = -1 And Sgn(y) = -1 Then
Print "点(" & x & "," & y & ")" & "位于第三象限"
Exit Sub
End If
If Sgn(x) = -1 And Sgn(y) = 1 Then
Print "点(" & x & "," & y & ")" & "位于第二象限"
Exit Sub
End If
If Sgn(x) = 1 And Sgn(y) = -1 Then
Print "点(" & x & "," & y & ")" & "位于第四象限"
Exit Sub
End If
End Sub
vb编程象限判断!声明字符与声明的数据类型不符 帮我指出哪里不对啊
感觉对了啊