vb编程象限判断!声明字符与声明的数据类型不符 帮我指出哪里不对啊Private Sub Command1_Click()x = InputBox("请输入x的值")y = InputBox("请输入y的值")If x = 0 ThenPrint "点(" & x & "," & y & ")" & "位于y轴上"Exit
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/21 09:24:00
vb编程象限判断!声明字符与声明的数据类型不符 帮我指出哪里不对啊Private Sub Command1_Click()x = InputBox("请输入x的值")y = InputBox("请输入y的值")If x = 0 ThenPrint "点(" & x & "," & y & ")" & "位于y轴上"Exit
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编程象限判断!声明字符与声明的数据类型不符 帮我指出哪里不对啊Private Sub Command1_Click()x = InputBox("请输入x的值")y = InputBox("请输入y的值")If x = 0 ThenPrint "点(" & x & "," & y & ")" & "位于y轴上"Exit
感觉对了啊
试验了没错,输入什么时出错了