Answer:
// Program is written in Java Programming Language
// Comments are used for explanatory purpose
// Program starts here
public class RandomOddEve {
/** Main Method */
public static void main(String[] args) {
int[] nums = new int[100]; // Declare an array of 100 integers
// Store the counts of 100 random numbers
for (int i = 1; i <= 100; i++) {
nums[(int)(Math.random() * 10)]++;
}
int odd = 0, even = 0; // declare even and odd variables to 0, respectively
// Both variables will serve a counters
// Check for odd and even numbers
for(int I = 0; I<100; I++)
{
if (nums[I]%2 == 0) {// Even number.
even++;
}
else // Odd number.
{
odd++;
}
}
//.Print Results
System.out.print("Odd number = "+odd);
System.out.print("Even number = "+even);
}