Question: Given an array of 20 elements 10, 21, 0, 41, 24, 9, 29, 0, 90, 85, 77, 56, 62, 17, 0, 33, 23, 44,

Given an array of 20 elements 10, 21, 0, 41, 24, 9, 29, 0, 90, 85, 77, 56, 62, 17, 0, 33, 23, 44, 50, 52. Complete the program to print the total number of odd numbers in the array and even numbers in the array. public class soll { public static void main(String[] args) { // TODO Auto-generated method stub int[] array1 = {10, 21, 0, 41, 24, 9, 29, 0, 90, 85, 77, 56, 62, 17, 0, 33, 23, 44, 50, 52}; int oddcount = 0, evencount = 0; } System.out.println("Number of even numbers: + evencount + and " number of odd numbers: + oddcount); } }
Step by Step Solution
3.46 Rating (153 Votes )
There are 3 Steps involved in it
Heres the completed program public class soll public static void mainString ... View full answer
Get step-by-step solutions from verified subject matter experts
