dim income, tax as double
select case income
case is < 1000
tax = 0.0
case 1000 to 1999
tax = 0.05 * income
case 2000 to 4999
tax = 0.05 * 2000 + 0.10 * (income - 2000)
case 5000 to 9999
tax = 0.05 * 2000 + 0.10 * 3000 + 0.25 * (income - 5000)
case 10000 to 19999
tax = 0.05 * 2000 + 0.10 * 3000 + 0.25 * 5000 + 0.4 * (income - 10000)
case is >= 20000
tax = 0.05 * 2000 + 0.10 * 3000 + 0.25 * 5000 + 0.4 * 10000 + (income-20000)
end select