From 81f7432d5260520cf5846c7b28e409058187bbea Mon Sep 17 00:00:00 2001 From: Debora Freitas Date: Sat, 27 Mar 2021 18:07:02 -0300 Subject: [PATCH] Exercicio semana 3 --- exercicioS3/desafio1.html | 9 +++++++++ exercicioS3/desafio1.js | 18 ++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 exercicioS3/desafio1.html create mode 100644 exercicioS3/desafio1.js diff --git a/exercicioS3/desafio1.html b/exercicioS3/desafio1.html new file mode 100644 index 0000000..5c7dcb1 --- /dev/null +++ b/exercicioS3/desafio1.html @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/exercicioS3/desafio1.js b/exercicioS3/desafio1.js new file mode 100644 index 0000000..a15ad85 --- /dev/null +++ b/exercicioS3/desafio1.js @@ -0,0 +1,18 @@ + +function detran(){ +var velocidadePermitida = Number(prompt("Insira a velocidade permitida na via")) +var velocidadeCondutor = Number(prompt("Insira a velocidade do condutor")) + +if(velocidadeCondutor <= velocidadePermitida){ +alert("Não houve infração.")} + +else if((velocidadeCondutor <=((velocidadePermitida * 0.1)) + velocidadePermitida)){ +alert ("Infração leve")} + +else { + alert("Multa grave")} + +} +detran() + +