如果沒(méi)有其他錯(cuò)誤,此代碼會(huì)不斷獲取。我在這里看不到問(wèn)題。請(qǐng)幫忙。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"); } } }}它說(shuō)在每個(gè)“其他”上都有一個(gè)錯(cuò)誤。
添加回答
舉報(bào)
0/150
提交
取消