
vbs脚本出现错误,请大家帮我看一下是哪里出了问题,再此不尽感激
msgbox"111"msgbox"111"dima,b,x,y,za=inputbox("111")b=inputbox("111")a=int(a)b=int(b)x...
msgbox "111"
msgbox "111"
dim a,b,x,y,z
a=inputbox("111")
b=inputbox("111")
a=int(a)
b=int(b)
x=(a^2+b^2)^0.5
y=(a^2-b^2)^0.5
z=(b^2-a^2)^0.5
x=CDbl(x)
y=CDbl(y)
z=CDbl(z)
if c>(a and b) and x=int(x) then
msgbox c
else if a>b and c<(a or b) and y=int(y) then
msgbox d
else if b>a and c<(a or b) and z=int(z) then
msgbox e
else msgbox "111"
end if
end if
end if
msgbox "111"
行:10
字符:1
错误:无效的过程或参数错误
代码:800A0005
源:Microsoft VBScript执行运行时出错 展开
msgbox "111"
dim a,b,x,y,z
a=inputbox("111")
b=inputbox("111")
a=int(a)
b=int(b)
x=(a^2+b^2)^0.5
y=(a^2-b^2)^0.5
z=(b^2-a^2)^0.5
x=CDbl(x)
y=CDbl(y)
z=CDbl(z)
if c>(a and b) and x=int(x) then
msgbox c
else if a>b and c<(a or b) and y=int(y) then
msgbox d
else if b>a and c<(a or b) and z=int(z) then
msgbox e
else msgbox "111"
end if
end if
end if
msgbox "111"
行:10
字符:1
错误:无效的过程或参数错误
代码:800A0005
源:Microsoft VBScript执行运行时出错 展开
2个回答
展开全部
y=(a^2-b^2)^0.5
z=(b^2-a^2)^0.5
这两句肯定会有一句出错
x^0.5 就是 x的二次方根,x如果是负数的话,无法计算,就会报错
所以你的vbs脚本中开始输入的两个数字,除非相等,否则(a^2-b^2)或者(b^2-a^2)必有一个为负数,执行就会报错
z=(b^2-a^2)^0.5
这两句肯定会有一句出错
x^0.5 就是 x的二次方根,x如果是负数的话,无法计算,就会报错
所以你的vbs脚本中开始输入的两个数字,除非相等,否则(a^2-b^2)或者(b^2-a^2)必有一个为负数,执行就会报错
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询