Question

** Please provide a code in MATLAB ** 1. Write a function called taxcalculator that reads...

** Please provide a code in MATLAB **

1. Write a function called taxcalculator that reads an amount in dollars, adds tax based on the table below and return the total with tax using elseif statement.

2. Write a function called printstars that reads the number of rows and returns a triangle of stars similar to the one below:
      *
     **
    ***
   ****
  *****
 ******
*******
********

0 0
Add a comment Improve this question Transcribed image text
Answer #1

2.

CODE

=============

row=input('enter number of rows: \n');
for i= 0:row-1;
for j=row-i:-1:2
fprintf(' ')
end
for k=0:i
fprintf('* ')
end
fprintf('\n')
end

NOTE: In order to answer part 1, you would need to provide me the table to calculate the tax. Please post part 1 separately along with the table and I will try to answer it.

Add a comment
Know the answer?
Add Answer to:
** Please provide a code in MATLAB ** 1. Write a function called taxcalculator that reads...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT