0
Read from Array integers and find divid of odd number
Read from Array integers and find divid of odd number
2 Réponses
+ 2
hi
for finding odd numbers you can iterate through the array and check if the remainder of the integer by 2 is zero or not
if not it's odd
code is something like this:
for (int i =0; i < yourArray.length ; i++){
if((yourArray[i] %2) != 0){
// the number is odd .... now you
//can do whatever you want with
// it
}// end of if
}//end of for
0
What is code for this