题解 | 温标转换
温标转换
https://www.nowcoder.com/practice/41ceb724a9e843ecad8192cfbea56466
import java.util.*;
public class Main{
public static void main(String[] args){
double k,c,f;
Scanner scan = new Scanner(System.in);
k = scan.nextDouble();
c = k - 273.15;
f = c*1.8 + 32;
System.out.printf("%.9f",f);
// String s;
// s = Double.toString(f);
// System.out.println(s);
// if(s.contains(".")){
// System.out.println(s+"000");
// }else{
// System.out.println(s+".000");
// }
}
}
查看20道真题和解析