/home/caleb/ASDV-Java/MP1_CalebFontenot/src/main/java/com/calebfontenot/mp1_calebfontenot/WindChill.java |
package com.calebfontenot.mp1_calebfontenot;
import java.util.Scanner;
@author
public class WindChill {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.print("Enter the temperature in Fahrenheit between -58∞F and 41∞F: ");
double fahrenheit = input.nextDouble();
System.out.print("Enter the wind speed miles per hour "+
"(must be greater or equal to 2):");
double speed = input.nextDouble();
double windChillIndex = 35.74 + 0.6215 * fahrenheit - 35.75
* Math.pow(speed, 0.16) + 0.4275 * fahrenheit
* Math.pow(speed, 0.16);
System.out.println("The wind chill index is "+ windChillIndex);
}
}