dim x,y as integer '定义两个变量,X代表收入,Y代表应征税收
if x>0 and x<800 then y=0
elseif x>=800 and x<1200 then y=(x-800)*0.03
elseif x>=1200 and x<5000 then y=400*0.03+(x-1200)*0.04'400表示800到1200时所应交的税
elseif x>=5000 then y=400*0.03+3800*0.04+(x-5000)*0.05
else msgbox "输入数值错误"
end if