使用双分支选择结构求一个数的绝对值



Dim x as single, y as single

x=Vla(Inputbox(“输入一个数x”,”求绝对值”))

If x>=0 then

y=x

Else

____________

End If

Print “x=”;x;”绝对值y=”;y
出自:辽宁科技学院Python程序设计(专升本)