Difference between revisions of "Windchill"

From CompSciWiki
Jump to: navigation, search
Line 6: Line 6:
 
:<math>T_{wc}=13.12 + 0.6215 T_a-11.37 V^{0.16} + 0.3965 T_a V^{0.16}\,\!</math>
 
:<math>T_{wc}=13.12 + 0.6215 T_a-11.37 V^{0.16} + 0.3965 T_a V^{0.16}\,\!</math>
  
:<small>where <math>T_{wc}\,\!</math> is the wind chill index based on the Celsius scale, <math>T_a\,\!</math> is the air temperature in °C, and <math>V\,\!</math> is the air speed in [[kilometres per hour|km/h]] measured at {{convert|10|m|ft}}, standard [[anemometer]] height).
+
:<small>where <math>T_{wc}\,\!</math> is the wind chill index based on the Celsius scale, <math>T_a\,\!</math> is the air temperature in °C, and <math>V\,\!</math> is the air speed in [[kilometres per hour|km/h]].
 
:::<small>Equation taken from Wikipedia which cites [[Environment Canada|http://www.msc.ec.gc.ca/education/windchill/science_equations_e.cfm]]
 
:::<small>Equation taken from Wikipedia which cites [[Environment Canada|http://www.msc.ec.gc.ca/education/windchill/science_equations_e.cfm]]
 
</small>
 
</small>

Revision as of 18:53, 23 September 2010

Back to the Program-A-Day homepage

Problem

As you know from living in Winnipeg, wind can make the air temperature feel much colder. Write a program that will use Scanner to read in an air temperature and a wind speed. Then use the formula below to calculate and output the windchill.


<math>T_{wc}=13.12 + 0.6215 T_a-11.37 V^{0.16} + 0.3965 T_a V^{0.16}\,\!</math>
where <math>T_{wc}\,\!</math> is the wind chill index based on the Celsius scale, <math>T_a\,\!</math> is the air temperature in °C, and <math>V\,\!</math> is the air speed in km/h.
Equation taken from Wikipedia which cites http://www.msc.ec.gc.ca/education/windchill/science_equations_e.cfm


Sample output with location Winnipeg, air temperature -10 and wind speed 30:

Location: Winnipeg
Current Temperature: -10.0 Celsius
Wind Speed: 30.0 km/h
Temperature with Windchill: -19.52049803338773
Programmed by A. Student
**End of Program**
 

Java Fundamentals

Wiki chars03.jpg

Solution

Code

Code

Solution Code

Back to the Program-A-Day homepage