写一个Java程序来转换华氏度到摄氏度,并举例说明。计算摄氏度的数学公式 = (华氏 - 32) * 5 / 9
package Remaining;
import java.util.Scanner;
public class FahrenheitToCelsius {
private static Scanner sc;
public static void main(String[] args) {
sc= new Scanner(System.in);
System.out.print("Enter the Temperature in Fahrenheit = ");
double fahrenheit = sc.nextDouble();
double celsius = (fahrenheit - 32) * 5 / 9;
System.out.println("Temperature in Fahrenheit = " + fahrenheit);
System.out.println("Temperature in Celsius = " + celsius);
}
}