-
-
Save codecademydev/ab97fddb236dc76d25ee6188e8588573 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
// Define the initial value of kelvin and | |
// set to 293 degrees kelvin | |
const kelvin = 293; | |
// convert degrees kelvin to degrees celcius by subtracting 273 | |
const celsius = kelvin - 273; | |
// Convert to degrees fahrenheit and round down | |
let fahrenheit = Math.floor(celsius * (9/5) + 32); | |
console.log(`The temperature ${kelvin} is ${fahrenheit} degrees Fahrenheit.`); | |
// Convert degrees celsius to degrees newton | |
let newton = Math.floor(celsius * (33/100)); | |
console.log(`The temperature ${celsius} is ${newton} degrees newton.`) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment