This is what my command window shows:
>> Tax Please provide taxable income in Australian Dollars:6001 Income Tax is 0.170000. Medicare Levy is 90.015000. Total Tax is 90.015000.
TaxableIncome=input('Please provide taxable income in Australian Dollars:');
IncomeTax=0;
MedicareLevy=(TaxableIncome*0.015);
TotalTax=IncomeTax + MedicareLevy;
if IncomeTax>0 && MedicareLevy>0
end
if TaxableIncome>=0
end
if TaxableIncome>=0 && TaxableIncome<=6000
elseif TaxableIncome>6000&& TaxableIncome<=20000
IncomeTax=0.17*(TaxableIncome-6000);
elseif TaxableIncome>20000 && TaxableIncome<=50000
IncomeTax=2380+0.30*(TaxableIncome-20000);
elseif TaxableIncome>50000 && TaxableIncome<=60000
IncomeTax=11380+0.42*(TaxableIncome-50000);
elseif TaxableIncome>60000
IncomeTax=15580+0.47*(TaxableIncome-60000);
end
fprintf('Income Tax is %f.\n', IncomeTax);
fprintf('Medicare Levy is %f.\n', MedicareLevy);
fprintf('Total Tax is %f.\n', TotalTax);
This is the question I am answering but I am not sure why my Total Tax isnt adding the Medicare Levy and the Income Tax:
3.11 The author of this book now lives in Australia. Australia is a great place
to live, but it is also a land of high taxes. In 2002, individual citizens and
residents of Australia paid the following income taxes: Taxable Income (in A$) Tax on This Income
$0–$6,000 None
$6,001–$20,000 17¢ for each $1 over $6,000
$20,001–$50,000 $2,380 plus 30¢ for each $1 over $20,000
$50,001–$60,000 $11,380 plus 42¢ for each $1 over $50,000
Over $60,000 $15,580 plus 47¢ for each $1 over $60,000 In addition, a flat 1.5% Medicare levy is charged on all income. Write a
program to calculate how much income tax a person will owe based on this information. The program should accept a total income figure from the user and calculate the income tax, Medicare levy, and total tax payable by the individual.| *
*
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!