Posts by Miyuki Fukagawa • 29 points
4 posts
-
0
votes1
answer41
viewsQ: Printing Percentage
I tried to make an algorithm to print the percentage of each type of vote, but my code misses for some reason, can anyone explain to me why? Goes below: /*Escreva um algoritmo para ler o número…
javascriptasked Miyuki Fukagawa 29 -
-1
votes4
answers60
viewsQ: Averaging
I am trying to make an average calculation between 2 values, but at the time of printing it is printing wrong, in what I am missing? var p1 = Number ('7.0') var p2 = Number ('9.3') const media = 2 /…
javascriptasked Miyuki Fukagawa 29 -
-2
votes4
answers85
viewsQ: Printing the highest value variable
I’m trying to print the variable with the highest value, but the value is always N1. How do I print the correct value? var n1 = 4; var n2 = 7; var n3 = 6; if (n1 > n2, n3) { console.log("N1 é a…
javascriptasked Miyuki Fukagawa 29 -
0
votes1
answer79
viewsQ: Javascript condition
I started studying javascript recently and the following code is only giving me the wrong answer, where I went wrong? When I play at the prompt to see if it’s right, it gives me "n1 is odd" //…