Tomorrow is predicted to be blustery and
cold! Write a C++ program to produce a
table of wind-chill factors. This
number, based on both the temperature and the wind speed, is used to indicate the
relative coldness we experience when outside.
The formula for the wind-chill factor is
wcf = 91.4 - (0.486 + 0.305 * sqrt(s) - 0.02 * s) * (91.4 -
temp)
where s is the wind speed and temp
the temperature. You should write this
formula as a function.
Your program should print a table of wind
chill factors as a function of temperature and wind speed where the temperature
ranges from -500 to 500 Fahrenheit and the wind speed
ranges from 5 to 50 miles per hour. Use
a function to calculate the wind chill factor.
Your output should appear similar to the
following:
Wind Chill Factor Table (Degrees F)
Temperature Wind Speed (Miles per Hour)
Reading (Deg F) 5 10 15 20 25 30 35 40 45 50
-50
-45
-40
etc.
20 -16
etc.
50
One of the values of the wind chill
factor has been shown to enable you to check your computation.
Make sure your program works correctly.