Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Joe is running a take-out pizza shop Pizza-R-US that sells 10 diameter round (circle) and 9 square pizzas. Write a MIPS assembly language program to

Joe is running a take-out pizza shop Pizza-R-US that sells 10" diameter 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.

The program:

1. a) prompts Joe for the number of round and square pizzas sold in a day. Obviously, the program must ask Joe to input two integer numbers: the number of circle piazza and the number of square pizza sold.

b) prompts Joe for his estimate 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 Joe 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 Joe's estimate (from 1.b), otherwise prints "Bummer!".

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).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

College Accounting A Contemporary Approach

Authors: David Haddock, John Price, Michael Farina

3rd edition

77639731, 978-0077639730

Students also viewed these Accounting questions