Published on January 26, 2024By DeveloperBreeze

// Function to convert temperature from Celsius to Fahrenheit
function celsiusToFahrenheit(celsius) {
    return (celsius * 9/5) + 32;
}

// Example temperature in Celsius
const temperatureInCelsius = 25;

// Convert the temperature to Fahrenheit using the celsiusToFahrenheit function
const temperatureInFahrenheit = celsiusToFahrenheit(temperatureInCelsius);

// Log the converted temperature to the console
console.log('Temperature in Fahrenheit:', temperatureInFahrenheit);

Comments

Please log in to leave a comment.