问题:计算风寒湿度(要求风速必须>=2,华氏度在-58度至41度之间)
package homeWork;
import java.util.Scanner;
public class T0822 {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
//prompt the user to enter the fahrenheit and wind chill index
System.out.print("Enter the tempreture in fahrenheit between -58 °F and 41 °F:");
double tempreture = input.nextDouble();
System.out.print("Enter the wind speed miles per hour(must be greater than or equal to 2:");
double windChill = input.nextDouble();
if(tempreture >= (-58) && tempreture <= 41 && windChill >= 2) {
//T是风寒温度
double T = 35.74 + 0.6215 * Math.pow(windChill, 0.16) + 0.4275 * Math.pow(tempreture,0.16);
System.out.println("The wind chill index is " + T);
}
else
System.out.println("Can't run");
input.close();
}
}
出现了这种状况,请教大家,这是什么?