Answers for "javascript function celsius to fahrenheit"

4

javascript celcius to farenheit

const celsiusToFahrenheit = celsius => celsius * 9/5 + 32;

const fahrenheitToCelsius = fahrenheit => (fahrenheit - 32) * 5/9;

// Examples
celsiusToFahrenheit(15);    // 59
fahrenheitToCelsius(59);    // 15
Posted by: Guest on July-03-2020
0

how to convert celsius to fahrenheit in javascript

function cToF(celsius) 
{
  var cTemp = celsius;
  var cToFahr = cTemp * 9 / 5 + 32;
  return cToFahr;
}
console.log(cToF(36))

function FtoC(fahrenheit){
    let celcius = fahrenheit*5/9 -32;
    return celcius;
}
console.log(FtoC(20));
Posted by: Guest on August-06-2021
-1

convert fahrenheit to celsius formula javascript

<!DOCTYPE html>
<html>
<head>
    <title>Fahrenheit From Celsius</title>
</head>
<body>
    <script>
        var cTemp = 100; // temperature in Celsius
        // Let's be generous with parentheses
        var hTemp = ((cTemp * 9) /5 ) + 32;
        document.write("Temperature in Celsius: " + cTemp + " degrees<br/>");
        document.write("Temperature in Fahrenheit: " + hTemp + " degrees");
    </script>
</body>
</html>
Posted by: Guest on January-05-2021

Code answers related to "javascript function celsius to fahrenheit"

Code answers related to "Javascript"

Browse Popular Code Answers by Language