Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The slightest help would be appreciated Write a MIPS assembly language program that reads how many T-shirts a customer wants to purchase. If a customer

The slightest help would be appreciated

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spomenik Monument Database

Authors: Donald Niebyl, FUEL, Damon Murray, Stephen Sorrell

1st Edition

0995745536, 978-0995745537

Students also viewed these Databases questions

Question

Discuss all branches of science

Answered: 1 week ago

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago