-
-
Save codecademydev/021bcf243874258fb45b58c2b7078e56 to your computer and use it in GitHub Desktop.
Codecademy export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Current temperature in kelvin degrees. | |
const kelvin = 0; | |
//converting kelvin to Celsius. | |
const celsius = kelvin - 273; | |
//Convert celsius to Fahrenheit. | |
let fahrenheit = celsius * (9/5) + 32; | |
//Rounding down fahrenheit. | |
fahrenheit = Math.floor(fahrenheit); | |
console.log(`The temperature ${fahrenheit} degrees fahrenheit.`); | |
let Newton = celsius * (33/100); | |
Newton = Math.floor(Newton); | |
console.log(`The temperature ${Newton} degrees Newton.`); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment