celsiusToFahrenheit method
Converts Celsius to Fahrenheit.
Formula: (°C × 9/5) + 32 = °F
Example:
print(25.celsiusToFahrenheit()); // 77.0
Implementation
double celsiusToFahrenheit() {
return this * 9 / 5 + 32;
}
Converts Celsius to Fahrenheit.
Formula: (°C × 9/5) + 32 = °F
Example:
print(25.celsiusToFahrenheit()); // 77.0
double celsiusToFahrenheit() {
return this * 9 / 5 + 32;
}