Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exercicios terceira semana Raphaella #17

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions exercicios/exercicio1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<html>
<body>
<script src="exercicio1.js"></script>
</body>
</html>
20 changes: 20 additions & 0 deletions exercicios/exercicio1.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
let velocidade = Number(prompt("Digite a velocidade da via"))
let velocidadeCondutor = Number(prompt("Digite a velocidade do motorista"))

function calcularMulta(){

if(velocidadeCondutor <= velocidade){
alert("Sem Multa")

}

else if (velocidadeCondutor <= 1.10*velocidade){
alert("Multa Leve")

}

else if (velocidadeCondutor > 1.20*velocidade){
alert("Multa Grave")
}
}
calcularMulta()
5 changes: 5 additions & 0 deletions exercicios/exercicio2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<html>
<body>
<script src="exercicio2.js"></script>
</body>
</html>
11 changes: 11 additions & 0 deletions exercicios/exercicio2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Crie um programa que está o valor inserido pelo usuário e imprima seus multiplos (MAX 100 Numeros)
var valor = Number (prompt ("Insira um valor"));
function multiplicarNum(){

for (var i = 1; i <= 100; i++){
let resultado = valor * i;
document.write("multiplo" + i + ": " + resultado + "<br>");

}
}
multiplicarNum(valor);