package dome2_17;
import java.util.Scanner;
public class Dome2_17 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Enter the temperature in Fahrenheit between -58°F and 41°F: ");
double temperature = in.nextDouble();
System.out.println("Enter the wind speed (>=2)in miles per hour:");
double wind = in.nextDouble();
double index = 35.74 + 0.6215 * temperature - 35.75 * Math.pow(wind, 0.16) + 0.4275 * temperature * Math.pow(wind, 0.16);
System.out.println("The wind chill index is " + index);
}
}
java语言程序设计(基础篇)第十版编程练习题[2.17]
最新推荐文章于 2020-06-02 16:24:02 发布