Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created December 4, 2020 09:53
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/fef7f9e314a559454153011f3e81d9e2 to your computer and use it in GitHub Desktop.
Save codecademydev/fef7f9e314a559454153011f3e81d9e2 to your computer and use it in GitHub Desktop.
Codecademy export
//Today's forcast is 293 Kelvin.
const kelvin = 293;
//To get celcius, subract 273 from kelvin.
const celsius = kelvin - 273;
//Calculate fahreinheit you need formula.
let fahreinheit = celcius * (9/5) + 32;
//To round up number
fahreinheit = Math.floor(fahreinheit);
console.log(`The temperature is ${fahreinheit} degrees Fahreinheit.`);
const newton = Celsius * (33/100);
newton = Math.floor(newton);
console.log(`The temperature is ${newton} degrees Newton.`);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment