Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function divideWithoutRemainder(input){
- let n =Number(input[0])
- let p1=0;
- let p2=0;
- let p3=0;
- for(let i = 1; i <n; i++){
- let num=Number(input[i]);
- if(num%2==0){
- p1++
- }
- if(num%3==0){
- p2++
- }
- if(num%4==0){
- p3++
- }
- }console.log(p1)
- console.log(p2)
- console.log(p3)
- }
- divideWithoutRemainder([
- "10",
- "680",
- "20",
- "600",
- "200",])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement