Created
February 22, 2015 16:07
-
-
Save jamc92/d128f842bb28c30c53e5 to your computer and use it in GitHub Desktop.
JS - Fahrenheit to Celsius
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--@authot Javier Madrid--> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title> De Fahrenheit a Celsius</title> | |
</head> | |
<body> | |
<script> | |
//Asignando valor a variable | |
var cTemp = 100; | |
// Transformando a Fahrenheit | |
var hTemp = ((cTemp * 9) / 5) + 32; | |
//Escribiendo desde el DOM | |
document.write("Temperatura en Celsius: " + cTemp + " grados <br>"); | |
document.write("Temperatura en Fahrenheit: " + hTemp + "grados"); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment