Computer and display the income tax due in the state of East

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

Solution

Answer :-


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

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

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site