Posts by rafael Moura • 41 points
1 post
-
4
votes7
answers53067
viewsA: Knowing if the number is odd or even
var n = prompt("Digite um numero"); var total = n/2; if(n / 2 = 0) { alert("Par"); } if(n / 2 = 1){ alert("Impar"); } alert(total); Friend when you use: var 'total = n/2' you’re just dividing this…
javascriptanswered rafael Moura 41