Converts Celsius to Fahrenheit.
Follows the conversion formula F = 1.8C + 32
.
代码实现
func CelsiusToFahrenheit(d float64) float64 {
return 1.8 * d + 32.0
}
使用样例
CelsiusToFahrenheit(33.0) // 91.4
Converts Celsius to Fahrenheit.
Follows the conversion formula F = 1.8C + 32
.
func CelsiusToFahrenheit(d float64) float64 {
return 1.8 * d + 32.0
}
CelsiusToFahrenheit(33.0) // 91.4