bacco

Celsius to Fahrenheit

Mar 14th, 2018
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function read([arg1]){
  2.  
  3.         var celsius = Number(arg1);
  4.        
  5.         var fahrenheit = (celsius * (9 / 5)) + 32;           //   (°C × 9/5) + 32
  6.  
  7.         fahrenheit = Math.round((fahrenheit) * 100) / 100,
  8.        
  9.         console.log(fahrenheit);
  10.    }
Advertisement
Add Comment
Please, Sign In to add comment