1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
public
class
A02 {
/**
* @param args
*/
public
static
void
main(String[] args) {
// TODO Auto-generated method stub
Scanner input =
new
Scanner (System.in);
System.out.print(
"请输入华氏温度:"
);
double
Fahrenheit=input.nextDouble();
System.out.println(
"华氏温度\t摄氏温度"
);
double
temperature=Fahrenheit*
9.0
/
5
;
System.out.println(Fahrenheit+
"\t"
+temperature);
}
}
|
本文转自 Y幕徐 51CTO博客,原文链接:http://blog.51cto.com/765133133/1420142