Part I:
Bob is running a take-out pizza shop Pizza-R-US that sells 6 round (circle) and 9 square pizzas. Write a MIPS assembly language program to help him to calculate the total square foot of pizzas he has sold during a day. Note: the diameter of a round pizza is 6.
The program:
1. a) prompts Bob for the number of round and square pizzas sold in a day. Obviously, the program must ask Bob to input two integer numbers: the number of round piazza and the number of square pizza sold. b) prompts Bob for his goal of total pizzas sold in that day in square feet (a floating point number).
2. calculates the total pizza sold in square feet for each type (circle and square) and for both types.
3. a) prints out the calculation results such that Bob would know a) the total number of square feet of pizza sold. b) the total number of square feet of round pizzas, and c) the total number of square feet of square piazzas. b) prints the message Yeah! if the total pizzas sold is greater than Bobs goal (from 1.b). otherwise prints Too bad!.
Note: single precision floating point arithmetic must be used for round piazzas but integer arithmetic should be used for square piazzas (except the last step when converting the total square inches to square feet), and floating point comparison must be used for 3.b).
Part II:
Carry out exercise 3.1, 3.6 and 3.13 of the textbook.
Reviews
There are no reviews yet.