Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this program, you will calculate and print windchills for wind speeds in MIPS. You will use the National Weather Service wind chill temperature index,

In this program, you will calculate and print windchills for wind speeds in MIPS. You will use the National Weather Service wind chill temperature index, which was effective in 2001. The previous measure was adapted to provide the following characteristics:

  • Calculates wind speed at an average height of 5 feet, the typical height of an adult human face, based on readings from the national standard height of 33 feet, typical height of an anemometer
  • Is based on a human face model
  • Incorporates heat transfer theory: heat loss from the body to its surroundings, during cold and breezy/windy days
  • Lowers the calm wind threshold to 3 mph
  • Uses a consistent standard for skin tissue resistance
  • Assumes no impact from the sun, i.e., clear night sky.

The wind chill is defined as winds at least 3 miles/hour and for temperatures at or below 50 degrees. Your program will be able to calculate windchills for winds up to 60 miles/hour. You will need an array of floats for the wind speed factor, which you will use to calculate the windchill. This array will hold the wind speed factor for winds from 3 to 60 miles/hour, in locations [0] to [57].

The formula for windchill in Fahrenheit is below, with T as the temperature in Fahrenheit, and V as the wind speed factor, calculated in miles per hour:

 windchill = 35.74 + 0.6215T - 35.75V + 0.4275TV

Your program will do the following:

  1. get the array of floats to hold the wind speed factors
  2. create float variables to hold the constants needed for the windchill calculation, and load those constants into registers to use in the windchill calculation
  3. create a loop to do the following:
    1. read in a temperature (int), stop looping when the user enters a temperature above 50
    2. calculate and print the windchills for this temperature, for all integer wind speeds from 3 to 60, rounding the windchills to the nearest int: output should look like the following
      temp: xxx windspeed windchill 3 xxx 4 xxx 5 xxx 60 xxx

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

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

More Books

Students also viewed these Databases questions

Question

How long have you lived in your current location?

Answered: 1 week ago