摄氏度华氏度相互转换
// 华氏度转摄氏度
const toCelsius = (fahrenheit) => {
return (fahrenheit - 32) * 5 / 9;
}
// 摄氏度转华氏度
const toFahrenheit = (celsius) => {
return (celsius * 9 / 5) + 32;
}
以自己现在的努力程度,还没有资格和别人拼天赋
// 华氏度转摄氏度
const toCelsius = (fahrenheit) => {
return (fahrenheit - 32) * 5 / 9;
}
// 摄氏度转华氏度
const toFahrenheit = (celsius) => {
return (celsius * 9 / 5) + 32;
}