如果没有其他错误,此代码会不断获取。我在这里看不到问题。请帮忙。import java.util.Scanner;public class TempOut { public static void main(String[] args) { //variable double t; double v; Scanner input = new Scanner(System.in); //inputs System.out.print("Give temperature(C): "); t = input.nextDouble(); System.out.print("Give wind velocity(km/h): "); v = input.nextDouble(); //formula if (((t>=-50) & (t=<5)) | 3>=v) { double formula = 13.12 + (2*(0.6251*t)) - (11.37*v) + ((0.3965*t)*v); System.out.print("The wind chill temperature is : "+formula); } else { if (((t<-50) & (t>5)) | v=<3) { System.out.print("Formula not suitable"); } else { System.out.print("Invalid input"); } } }}它说在每个“其他”上都有一个错误。
添加回答
举报
0/150
提交
取消