/*
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
 */
package com.calebfontenot.mp1_calebfontenot;

import java.util.Scanner;

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