Computer Science, asked by palji5740, 5 days ago

Write a program to find total number of odd and even number among 15 number

Answers

Answered by sanjoykumarsah
0

function ro(num){

let list = {

 odd:[],

 even:[]

}

for(i = 1; i < num; i++){

 if(i % 2 == 0){

  list.even.push(i)

 }

 else{

  list.odd.push(i)

 }

}

return(list)

}

ro(15)

Similar questions