DML School of Technology
Menu

First steps, Numbers

Celsius to Fahrenheit

The task

Convert a temperature from Celsius to Fahrenheit: multiply by 9, divide by 5, then add 32.

Write a function called toFahrenheit.

Tests

CallExpectedYours
toFahrenheit(0) 32 not run
toFahrenheit(100) 212 not run
toFahrenheit(-40) -40 not run
toFahrenheit(25) 77 not run
toFahrenheit(37) 98.6 not run

Next challenge · All challenges

solution.js

Tab indents. To leave the editor, press Escape, then Tab.

Output

Run prints what your code prints. Run the tests to check your function.