Answer to Question #4384 in Programming & Computer Science for Jackie

Question #4384
Use pseudocode to design a suitable program. In your program, make use of subprograms with parameters and arguments.

Computer and display the income tax due in the state of East Euphoria on a taxable income entered by the user, according to the following table:

Taxable Income Tax Due
From To
$0 $50,000 $0 + 5% of amount over $0
$50,000 $100,000 $2,500 + 7% of amount over $50,000
$100,000 ... $6,000 + 9% of amount over $100,000
1
Expert's answer
2011-10-07T12:55:19-0400
// Pseudocode for program that prompts user to enter Taxable Income
// and computes and prints proper Tax Due for inputted amount


INIT TaxableIncome
INIT TaxDue

PPRINT 'Enter Taxable Income'
READ TaxableIncome

& & CALL ComputeTaxDue with TaxableIncome RETURNING TaxDue

PRINT 'Tax Due for this Taxable Income is '
PRINT TaxDue




ComputeTaxDue

CASE TaxableIncome OF

& TaxableIncome < 50000 : RETURN TaxableIncome * 0.05
& TaxableIncome < 100000 : RETURN 2500 + (TaxableIncome - 50000) * 0.07
& TaxableIncome >= 100000 : RETURN 6000 + (TaxableIncome - 100000) * 0.09

& & OTHERS

& PRINT 'Invalid input!'
& RETURN 0

& & ENDCASE

END OF ComputeTaxDue

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS