Question: Wind Chill Factor1 Write a program that inputs the current temperature, the temperature scale (c for Celsius or f for Fahrenheit), and the wind speed

 Wind Chill Factor1 Write a program that inputs the current temperature,

Wind Chill Factor1 Write a program that inputs the current temperature, the temperature scale (c for Celsius or f for Fahrenheit), and the wind speed in miles per hour, then calculates and outputs the wind chill factor using the same temperature scale as that which was entered as input. Temperature and wind speed may include decimal places. Temperature output should use one decimal place. You may assume that input will be valid and the scale will be entered in lowercase. Meteorologists use the following formula to compute the wind chill factor, W: W = 35.74 +0.6215 T-35.75 V0.16+0.4275 T V0.16 where V is the wind speed in miles per hour and T is the temperature in degrees Fahrenheit2. The formulas to convert between Celsius and Fahrenheit are: ' Cz (F-32) and F=-C+32 In implementing your solution, include at least these three functions: ctof: A function that takes a Celsius temperature and returns its Fahrenheit equivalent. ftoc: A function that takes a Fahrenheit temperature and returns its Celsius equivalent. windchill: A function that takes a temperature in Fahrenheit degrees and a wind speed in miles per hour (both double), and returns the wind chill factor in Fahrenheit degrees. (You may, at your option, include a third parameter for the temperature scale, in which case the temperature is provided in the given scale, and the wind chill factor returned is in that same scale.) Your main function should prompt for the required information, make use of the functions above to calculate a result, then output the result. Use the pow function from the cmath library where appropriate

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!