Must be in pseudocode.

Compute the income tax due on taxable income entered by the user, given the data as shown in the following table. Be sure to include error checking to make sure the user does not enter a negative number. Assume all entries are integer values.
Taxable Income Tax Due
From To
$0 $49,999 $0+5% of amount over $0
$50,000 $99,999 $2,500+7% of amount over $50,000
$100,000 . . .  $6,000+9% of amount over $100,000

1 answer

income = 0
loop {
   print "Income: "
   read income
  if income <= 0 exit loop
  tax = (income > 100000) ? (6000+0.09*income-100000)
    : (income >= 50000) ? (2500+0.07*(income-50000)
    : (0.05*income)
<do what you want with the data>
}

assumes done when invalid value is entered. Otherwise, figure out an end flag and just skip invalid values.