Asked by austen

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

Answers

Answered by anonymous
is this java??
Answered by austen
no it is pseudo code on word
Answered by anonymous
i meant are you learning java??
Answered by austen
not really because we are not using java or raptor just learning how to make these and put them on word
Answered by anonymous
Here is your pseudo code
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.
Answered by austen
thank you can this work with main mod and the if and if else set up
There are no AI answers yet. The ability to request AI answers is coming soon!

Related Questions