Question
Write a program in C. The program for this lab will calculate the Wind Chill Index (T wc ), given an air temperature (T a
Write a program in C.
The program for this lab will calculate the Wind Chill Index (Twc), given an air temperature (Ta) in degrees Fahrenheit, and a wind speed (V) in miles per hour.
Your program will prompt the user to enter two values. The first value will be a temperature in degrees Fahrenheit, and will be of type int. The second value will be the wind speed in miles per hour, and will be of type double. You will use the following formula to calculate the Wind Chill Index which will be of type double: Twc = 35.74 + 0.6215Ta - 35.75V+0.16 + 0.4275TaV+0.16
Note that there are five constants in the above formula. You will use the pre-processing directive #define to express the first three constants: 35.74, 0.6215, and 35.75 (which will be named CONST_ONE, CONST_TWO, and CONST_THREE). You will use global constant declarations for the last two values: 0.16 and 0.4275 (which will be named EXPONENT and CONST_FOUR). The actual line(s) of code that calculates the wind chill will contain no digits.
Once you have calculated the Wind Chill Index, you will then display the temperature, wind speed and wind chill using descriptive statements such as:
Temperature: 38 degrees Fahrenheit Wind Speed: 17.4 mph Wind Chill Index: 28.6 degrees Fahrenheit
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