Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created November 16, 2019 01:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codecademydev/021bcf243874258fb45b58c2b7078e56 to your computer and use it in GitHub Desktop.
Save codecademydev/021bcf243874258fb45b58c2b7078e56 to your computer and use it in GitHub Desktop.
Codecademy export
//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