Question: Write a MIPS assembly code project that contains multiple utilities and will allow the user to choose based on which utility they want to use.

Write a MIPS assembly code project that contains multiple utilities and will allow the user to choose based on which utility they want to use. The utilities are described below. You will prompt the user to enter their choice of either a, b, c, or d and then based on their input, as described below, the program will prompt them to enter the further required information.

BodyMass Index (BMI) Calculator (a):

-According to the US Centres for Disease Control, the Body Mass Index (BMI) is a persons weight in kilograms divided by the square of height in meters. The formula to calculate the BMI is BMI = kg/m2 where kg is a person's weight in kilograms and m2 is their height in meters squared. The user will be prompted to enter weight in kilograms, followed by a height in meters and the program will out the corresponding BMI.

Fahrenheit to Celsius converter (b)

-The formula to convert a temperature given in Fahrenheit (F) to a temperature in Celsius (C) is C = (F 32)/1.8. The user will be prompted to enter a temperature in Fahrenheit and the program will output the corresponding temperature in Celsius.

Pounds to Kilograms converter (c)

- The formula to convert a weight given in pounds (lb) to a weight given in kilograms (kg) is kg = lb / 2.2046. The user will be prompted to enter weight in pounds and the program will output the corresponding weight in kilograms.

Sum calculator (d)

- The Sum calculator will begin by prompting the user to enter an integer number n and then computes (and displays once the final result is computed) the result as follows:

if n== 0, then result = 0, Otherwise result = n + Sum(n-1)

For example if the user enters the value 3 then the result will be 6 (and 6 will be displayed):

-You are required to define (and call) a procedure (e.g., called Sum and takes one integer argument n) to compute the final result.

Notes: If the user enters anything other than one of the four choices (a, b, c, or d), they will simply be reprompted enter their choice

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!