-
Notifications
You must be signed in to change notification settings - Fork 34
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
Enviando exercícios obrigatórios e extras de Rebeca Coelho. #25
base: rebeca-coelho
Are you sure you want to change the base?
Enviando exercícios obrigatórios e extras de Rebeca Coelho. #25
Conversation
|
||
if (pesoPeixe > 50 kg) { | ||
|
||
console.log ( "O peso dos peixes é maior que 50 kg. E pagará multa de 4 reais por quilo excedente." ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aqui seria interessante calcular qual o valor da multa que João pagará.
@@ -0,0 +1,13 @@ | |||
var ladoA = Number (prompt ( "Digite o valor do lado A do triângulo:" )) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aqui é legal vc deixar colado, sem espaços. Exemplo:
var ladoA = Number(prompt("Digite o valor do lado A do triângulo:" ))
var mediaRecuperacao = >= 5 & < 7 | ||
var media = nota1 + nota2 + nota3 + nota4 + nota5 / 5 | ||
|
||
if (nota1 + nota2 + nota3 + nota4 + nota5 / 5 >= mediaAprovada) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
que tal aqui vc olhar pra variavel media
?
var diasAno = 360 | ||
var diasPerdidosFumante = quantidadeCigarrosDia * minutosPorCigarro * quantidadeAnos * diasAno | ||
|
||
if (quantidadeCigarrosDia * minutosPorCigarro * quantidadeAnos * diasAno = diasPerdidosFumante){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fiquei em duvida: pq vc usou um if
aqui?
var ano = Number (prompt ("Digite o ano: ")) | ||
var bissexto = 366 | ||
|
||
if (ano / 4 = bissexto) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aqui vc está assumindo que se dividirmos um numero 4 ele vai ser igual 366.
Temos outras regras para validar se um ano é bissexto ou não, lembra?
- o resto da divisão por 400 dá 0 (ou seja, é multiplo de 400)
- é multiplo de 4 e não é multiplo de 100
Todos os outros que não estão nessa regra, não são bissextos ;)
Enviando exercícios obrigatórios e extras de Rebeca Coelho.