Question: 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 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
data prompt asciiz Enter Fahrenheit temperature output as... View full answer
Get step-by-step solutions from verified subject matter experts
