Write a Java program named RandomNumbers that creates a single-dimensional array of int of size 20 and initialize its elements with 20 random integer numbers (their range must be between 1 and 100...


Write a Java program named RandomNumbers that creates a single-dimensional array of int of size 20 and initialize its elements with 20 random integer numbers (their range must be between 1 and 100 inclusive. ​​​​​​​


a) Write statements in your program to display the array elements, and how many odd and even numbers are there in the array. ​​​​

​For example, if the random numbers were stored in the array are:


83 48 89 66 40 94 31 31 12 45 45 87 10 24 78 2 28 31 52 46


​Then the program should display:


The random numbers are:


83 48 89 66 40 94 31 31 12 45 45 87 10 24 78 2 28 31 52 46


There are 8 odd numbers


There are 12 even numbers



Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here