华氏度(Fahrenheit) 和摄氏度(Centigrade)都是温度单位。包括我国在内的世界上很多国家都使用摄氏度,美国和其他一些英语国家使用华氏度而较少使用摄氏度。
华氏度以其发明者Gabriel D. Fahrenheir(1681-1736)命名,其冰点是32°F,沸点为212°F。
摄氏度的发明者是Anders Celsius(1701-1744),其冰点是0°C,沸点为100°C。
两者的换算公式:
C=5/9(F-32)
F=9/5C+32
注:C代表摄氏度;F代表华氏度
互转的perl代码:
#!/usr/bin/perl -w
print "摄氏度和华氏温度互换:\n请输入:";
$input=<STDIN>;
chomp $input;
$sDegree=($input-32)*5/9;
$hDegree=$input*9/5+32;
print "$input F = $sDegree ℃\n$input ℃= $hDegree F\n";
By cursorkey, please reserve all words in the note when you want to copy!