Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that first prompts the user for a temperature in Fahrenheit. Read it in as a floating point value using a trap

Write a program that first prompts the user for a temperature in Fahrenheit. Read it in as a floating point 

Write a program that first prompts the user for a temperature in Fahrenheit. Read it in as a floating point value using a trap handler service. Then convert and write out that temperature in Celsius. Use single precision floating point instructions for the conversion. Then, if the temperature is above 80.0 F write out "Too Hot!" Use the familiar formula F = C 9/5 + 32. Of course, use floating point values. Here is a sample run: Enter Celsius: 35.67 Fahrenheit: 96.206 Too Hot! Here is another sample run: Enter Celsius: 22.5. Fahrenheit: 72.5 QtSpim may print out more digits than shown above. Test the program several times with different values, including negative. Set MIPS settings to the following: OFF Bare Machine OFF Enable Delayed Branches OFF Enable Mapped 10 OFF Enable Delayed Loads ON Load Exception Handler ON Accept Pseudo Instructions

Step by Step Solution

3.45 Rating (168 Votes )

There are 3 Steps involved in it

Step: 1

data prompt asciiz Enter Fahrenheit temperature output as... 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

Introduction to Java Programming, Comprehensive Version

Authors: Y. Daniel Liang

10th Edition

133761312, 978-0133761313

Students also viewed these Programming questions

Question

What is the purpose of encumbrance accounting?

Answered: 1 week ago

Question

What is a multivariate data set?

Answered: 1 week ago

Question

Solve y" + y = 1 - t 2 / 2 ? if 0 Answered: 1 week ago

Answered: 1 week ago