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 to Expert-Tailored Solutions

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

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

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

Public Sector Audit

Authors: Carolyn J. Cordery, David C. Hay

1st Edition

0367650622, 9780367650629

More Books

Students also viewed these Accounting questions