Skip to content

Instantly share code, notes, and snippets.

@McLarenCollege
Last active January 28, 2023 08:12
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 McLarenCollege/9db9445d69f6a0eccea35e31e2e8a852 to your computer and use it in GitHub Desktop.
Save McLarenCollege/9db9445d69f6a0eccea35e31e2e8a852 to your computer and use it in GitHub Desktop.
Exercise : Fahrenheit to Celcius

Given a temperature in Fahrenheit write an expression to calculate the Celsius temperature. To convert Fahrenheit to Celsius: take the temperature in Fahrenheit and subtract 32, then multiply the result by 5 then divide by 9 You must only write one arithmetic operation in each line.

CODE TEMPLATE


let fahrenheit = 104;
let celcius = ;// write your code here
// write your code here
// write your code here
console.log(celcius);

@AmandaShashaa
Copy link

let fahrenheit = 104;
let operation1 = fahrenheit - 32;
let operation2 = operation1 * 5;
let operation3 = operation2 / 9 ;
let celcius = operation3 ;
console.log(celcius);

@Alchemist6055
Copy link

let fahrenheit = 104;
let celcius;
celcius = fahrenheit - 32;
celcius * 5;
celcius / 9;
console.log(celcius);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment