CSC-111 In-class If-Stmt Exercise Wind Chill Problem with Solution

Solution

Don’t waster computer’s with the following equation if values are not in the proper range:

// Compute wind chill index
double windChillIndex = 35.74 + 0.6215 * fahrenheit - 35.75 *
  Math.pow(speed, 0.16) + 0.4275 * fahrenheit * 
  Math.pow(speed, 0.16);