Created
November 9, 2018 01:08
-
-
Save almirb/cb3762b06cd2f7385f0f9656028ce601 to your computer and use it in GitHub Desktop.
Média de 2 notas usando JavaScript
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title> Média de 2 Notas </title> | |
<script LANGUAGE="JavaScript" type="text/javascript"> | |
var nota1 = parseInt(prompt("Qual a nota 1?")); | |
var nota2 = parseInt(prompt("Qual a nota 2?")); | |
var media; | |
media = (nota1 + nota2) / 2; | |
alert("A média das notas é: " + media); | |
</script> | |
</head> | |
<body> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment