解题思路:
注意事项:
参考代码:
package com.cx;
import java.text.DecimalFormat;
import java.util.Scanner;
public class Exchange {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
float a = sc.nextFloat();
ExChange(a);
}
public static void ExChange(float a) {
float b = 5 * (a - 32) / 9;
DecimalFormat fnum = new DecimalFormat("##0.00");
String dd = fnum.format(b);
System.out.println(dd);
}
}
0.0分
0 人评分