Posts by Evandro Madeira • 1 point
1 post
-
-3
votes2
answers1405
viewsA: Perfect numbers
Hope it helps. Code made with java script: function numeroPerfeito(n) { let sum = 0; for (let x = 1; x <= (n / 2); x++) { if (!(n % x)) { sum += x; } } return sum == n; }…