Write a program that first prompts the user for a temperature in Fahrenheit. Read it in...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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 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
Expert Answer:
Answer rating: 100% (QA)
data prompt asciiz Enter Fahrenheit temperature output as... View the full answer
Related Book For
Introduction to Java Programming, Comprehensive Version
ISBN: 978-0133761313
10th Edition
Authors: Y. Daniel Liang
Posted Date:
Students also viewed these programming questions
-
Write a program in MIPS assembly language to convert an ASCII number string containing positive and negative integer decimal strings, to an integer. Your program should expect register $a0 to hold...
-
Convert the following program from machine language into MIPS assembly language. The numbers on the left are the instruction addresses in memory, and the numbers on the right give the instruction at...
-
Decode and execute the MIPS assembly language program. Show the changed register and memory values, in hexadecimal format, after the execution of each of the above assembly language instructions....
-
The following post-closing trial balance was prepared for Speedy Prints, Inc., but some balances were entered in the wrong column. Prepare a corrected post-closing trial balance. Assume all accounts...
-
Suppose you buy a one-year European call option on Wombat stock with an exercise price of $100 and sell a one-year European put option with the same exercise price. The current stock price is $100,...
-
Given N = 181 and t = 1.981, write the results of this paired-samples t test in APA format.
-
How should a capital expenditure be recorded? a. Debit capital b. Debit an expense C. Debit a liability d. Debit an asset
-
Applying the net present value approach with and without tax considerations Luther Currie, the president of Luther's Moving Services, Inc., is planning to spend $625,000 for new trucks. He expects...
-
AM Inc. has a beta of 1.4 and PM Inc. has a beta of 0.7. The required market return is 16% and the risk-free rate is 7%. After the financial crisis, the expected rate of inflation built into...
-
Colt Company reports pretax financial income of $143,000 in 2019. In addition to pretax income from continuing operations (of which revenues are $295,000), the following items are included in this...
-
Perry Company is in the heating and cooling business. Perry's best-selling item is a comprehensive package for a heating and cooling system maintenance check, tune-up, and energy efficiency test....
-
x1 and x + 2 are both factors of 2x- x + px+q. The value of p is and the value of q is
-
Function g is a transformation of the parent sine function, () = sin(1). 9(x)=sin(2x-5)+1 The phase shift of function g is
-
Provide the calculation for determining the present value of a bond with the following characteristics: a par value of $1,000, a coupon rate of 8.29 percent (paid annually), and a maturity period of...
-
The cash-flow diagram is provided. a. If P = $2,000, A = $250, and i% = 9% per year, then N = ? b. If P = $2,000, A = $250, and N= 8 years, then i = ? c. If A = $250, 1% = 9% per year, and N=4 years,...
-
2. A R.C. beam 300600 mm (overall) is reinforced with 4-250 bars at bottom and 2- 200 bars at top, each at an effective cover of 40 mm. Find the ultimate moment of resistance of the beam. What...
-
Fill in each blank so that the resulting statement is true. 83 + 103 = ______ .
-
Define a class named ComparableCircle that extends Circle and implements Comparable. Draw the UML diagram and implement the compareTo method to compare the circles on the basis of area. Write a test...
-
Revise GraphView in Listing 28.6 to display a weighted graph. Write a program that displays the graph in Figure 29.1 as shown in Figure 29.25. (Instructors may ask students to expand this program by...
-
There are several techniques for implementing the sqrt method in the Math class. One such technique is known as the Babylonian method. It approximates the square root of a number, n, by repeatedly...
-
Use Table A.2 to find the area to the right of z = 2.31. Z 0.00 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 -0.8 -0.7 .2119 .2090 .2420 2389 -0.6 .2743 .2061 .2033 2358 .2327 .2709 .2676 .2643 .2611...
-
Use any method to find the z-score with an area of 0.09 to its right.
-
If X is a continuous random variable, then P(X = a) = ___________________ for any number a. In Exercises 914, fill in each blank with the appropriate word or phrase.
Study smarter with the SolutionInn App