Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Advanced Technical Analysis dav/pid-5946170 dit-content-rid-27682875 2/courses/2

ID: 3204600 • Letter: A

Question

Advanced Technical Analysis dav/pid-5946170 dit-content-rid-27682875 2/courses/201620 SPRING EET305.22183A Resume upload Ro Guess Job details Current opportunit Career Site Self Ser g Assignment #1 Programming Problem #1 A tax structure for a particular country is as follows: Annual Gross Income (S Tax 0 15,000 none 18% for each dollar over 15,000 15,001 30,000 30,001 50.000 $2,550 25% for each dollar over 30,000 50,001 80,000 $7,550 28% for each dollar over 50,000 80,001 20,000 $15,950 33% for each dollar over 80,000 $29,150 38% for each dollar over 120.000 Over 120,000 Write an M-file that when executed will request an annual gross income to be entered in dollars and will display the tax owed on the command window. Demonstrate your program with the following 5 incomes and present the M-file and the command window containing all inputs and tax results. (Set the bank format in the Command Window before executing the program. $17,068 $42,687 $68,903 $100,260 $254,661

Explanation / Answer


prompt = 'What is the income?';
x=input(prompt);
if x<=15000
y=0;
elseif x > 15000 & x <=30000
y =0.18*(x-15000);
elseif x > 30000 & x <=50000
y =0.25*(x-30000) + 2550;
elseif x > 50000 & x <=80000
y =0.28*(x-50000) + 7550;
elseif x > 80000 & x <=120000
y =0.33*(x-50000) + 15950;
else
y =0.38*(x-50000) + 29150;
end
y

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote