Question: Write a MIPS assembly language program that reads how many T-shirts a customer wants to purchase. If a customer enters 0 or a negative integer,

Write a MIPS assembly language program that reads how many T-shirts a customer wants to purchase. If a customer enters 0 or a negative integer, then the program should print out "Please enter a positive integer. ", and exit. Otherwise, if a customer orders less than 10 T-shirts, then since each T-shirt costs 9 dollars, the payment will be 9 x the number of T-shirts. If a customer orders 10 or more T-shirts, and less then 20, then the customer will get a discount of 9 dollars, thus the payment will be (9 x the number of T-shirts) - 9. If a customer orders 20 or more T-shirts, then the customer will get a discount of 18 dollars, thus the payment will be (9 x the number of T-shirts) - 18. In addition, if a customer has a coupon, then there will be an additional discount of 5 dollars. After computing its payment including its discounts, it should print out the payment amount, along with the number of T-shirts.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!