Question
Wind Chill Factor Write a program that takes as input the current temperature, the temperature scale (c for Celsius, f for Fahrenheit), and Wind Speed
Wind Chill Factor Write a program that takes as input the current temperature, the temperature scale (c for Celsius, f for Fahrenheit), and Wind Speed (mph). Your program should then calculate and output the Wind Chill Factor using the same temperature scale taken as input. Temperature and wind speed should be expected to contain decimal places. Temperature output should contain one decimal place. You may assume that input will be valid and the scale will be entered in lower case. Meteorologists use the following formula to computer the wind chill factor (W): W=35.74+0.6215T-35.75V^0.16+0.4275TV^0.16 Where V is the wind speed (mph) and T is the temperature (degrees Fahrenheit). The formulas to convert between Celsius and Fahrenheit are: C=5/9 (F-32) and F=9/5 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. GetWindChill: A function that takes a temperature (F) and a wind speed (mph) and returns the wind chill factor in Fahrenheit. Your main function should prompt the user for the required information, make use of the functions above to calculate a result, then output the result.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started