Advertisement
teofarov13

Untitled

Mar 2nd, 2021
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function divideWithoutRemainder(input){
  2.     let n =Number(input[0])
  3.  
  4.     let p1=0;
  5.     let p2=0;
  6.     let p3=0;
  7.  
  8.     for(let i = 1; i <n; i++){
  9.         let num=Number(input[i]);
  10.             if(num%2==0){
  11.             p1++
  12.         }
  13.            if(num%3==0){
  14.                 p2++
  15.             }
  16.              if(num%4==0){
  17.                     p3++
  18.             }
  19.  
  20.             }console.log(p1)
  21. console.log(p2)
  22. console.log(p3)
  23.  
  24.     }
  25.  
  26. divideWithoutRemainder([
  27. "10",
  28. "680",
  29. "20",
  30. "600",
  31. "200",])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement