Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem: Given the temperature T of the air and the wind speed v , calculate the wind chill T w c : the temperature felt

Problem: Given the temperature T of the air and the wind speed v, calculate the wind chill Twc : the temperature felt by
humans and animals in a cold wind.
Twc=35.74+0.6215T-35.75v0.16+0.4275Tv0.16
Temperatures and the wind speed are double precision.
The coefficients (35.74,0.6215,-35.75,0.4275) and exponent (0.16) are required to be defined constants.
One mile is defined as 1.609344 kilometers. This is also a required defined constant.
The user can choose to enter either US customary units (degrees Fahrenheit and miles per hour) or SI units
(degrees Celsius and kilometers per hour). The program always displays the inputs in US units.
The equation above requires T to be in degrees Fahrenheit and v to be in miles per hour. The result Twc is the US
wind chill in degrees Fahrenheit. Convert the US wind chill to degrees Celsius for the SI wind chill.
Use ??302??260 in your print f format strings to display the degree symbol ().
Use the + flag for the temperature and wind chill placeholders in your print f format strings to force a plus sign
to be displayed for positive numbers. See p.58 of the Forouzan & Gilberg textbook.
This assignment requires the implementation of the selection by calculation technique. See p.51-52 of the
course notes packet.
Example Execution #1: (Recent local weather)
Enter 1 for US units, 2 for SI 1
Enter temperature (F)>11
Enter wind speed (mph)14
Example Execution #2: (Example #1 in SI units)
Enter 1 for US units, 2 for SI 2
Enter temperature (C),-11.67
Enter wind speed (kph)->22.53
Example Execution #4: (Mount Washington, 2023)
Enter 1 for US units, 2 for SI 1
Enter temperature (F),-46
Enter wind speed (mph)->97
=-=-=-=-=-=-=-=-=-=-=-=
Temperature: ,-46.0F
Wind speed: ,97.0mph
US wind chill: -108.1F
SI wind chill: -77.8C
=-=-=-=-=-=-=-=-=-=-=-=-=
Example Execution #5: (Projected local weather)
Enter 1 for US units, 2 for SI 1
Enter temperature (F)46
Enter wind speed (mph)4
=-=-=-=-=-=-=-=-=-=-=
Temperature: ,+46.0F
Wind speed: ,4.0mph
US wind chill: +44.2F
SI wind chill: ,+6.8C
=-=-=-=-=-=-=-=-=-=-=-=
image text in transcribed

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

Students also viewed these Databases questions