VB编程 select case问题
SelectCasexCaseIs<10k=1Case10<=x<20k=0.95Case20<=x<50k=0.9Case50<=x<100k=0.85CaseElse...
Select Case x
Case Is < 10
k = 1
Case 10 <= x < 20
k = 0.95
Case 20 <= x < 50
k = 0.9
Case 50 <= x < 100
k = 0.85
Case Else
k = 0.82
End Select
这种输入好像不对 电脑运行不正常,请各位大侠帮忙改改!!!
错误的 不行啊 展开
Case Is < 10
k = 1
Case 10 <= x < 20
k = 0.95
Case 20 <= x < 50
k = 0.9
Case 50 <= x < 100
k = 0.85
Case Else
k = 0.82
End Select
这种输入好像不对 电脑运行不正常,请各位大侠帮忙改改!!!
错误的 不行啊 展开
展开全部
Select Case x
Case Is < 10
k = 1
Case is < 20
k = 0.95
Case is < 50
k = 0.9
Case is < 100
k = 0.85
Case Else
k = 0.82
End Select
或者你用IF语句来实现
if x<10 then
k=10
elseif x<20 then
k=0.95
elseif x<50 then
k=0.9
elseif x<100 then
k=0.85
else
k=0.82
end if
Case Is < 10
k = 1
Case is < 20
k = 0.95
Case is < 50
k = 0.9
Case is < 100
k = 0.85
Case Else
k = 0.82
End Select
或者你用IF语句来实现
if x<10 then
k=10
elseif x<20 then
k=0.95
elseif x<50 then
k=0.9
elseif x<100 then
k=0.85
else
k=0.82
end if
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询