Skip to content

Commit 0b33e23

Browse files
problem 35 solved
1 parent d16727d commit 0b33e23

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

problem35/problem.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
You will be given the function input as Fahrenheit. You calculate the temperature and convert it to Celsius and return the output

problem35/problem35.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
3+
/* You will be given the function input as Fahrenheit. You calculate the temperature and convert it to Celsius and return the output */
4+
5+
6+
function fahrenToCelsius(fahren) {
7+
const inputFahren = fahren;
8+
const celsius = (inputFahren -32) * 5 / 9 ;
9+
const massage = inputFahren + "\xB0F fahrenheit equals to "+ celsius.toFixed(2) + "\xB0C Celsius.";
10+
return massage;
11+
}
12+
13+
console.log(fahrenToCelsius(11));

0 commit comments

Comments
 (0)