Question: Instruction: Create a java program that generates elements (randomly from 10 - 50) of a 2-timensional array (5x5) using the Random Class then perform the

 Instruction: Create a java program that generates elements (randomly from 10

Instruction: Create a java program that generates elements (randomly from 10 - 50) of a 2-timensional array (5x5) using the Random Class then perform the following 1) Output the array elements 2) Output the sum of prime numbers in the array 3) Output the elements in the main diagonal. 4) Output the sum of the elements below the diagonal 5) Output the sum of the elements above the diagonal 6 Output the odd members below the diagonal 7) Output the even mmbers above the diagonal. Sample Input/Output: Depicted below are sample outputs when the program is executed (the items in bold characters are input from the user, while the items in bold italic are generated, calculated and printed by the program): 1) Output the array elements 21 50 25 45 15 30 10 12 14 33 50 35 50 15 45 35 12 28 19 32 42 11 21 41 21 10 35 28 41 286 2) Output the sum of prime mumbers in the array 112 3) Output the elements in the main diagonal 4) Output the sum of the elements below the diagonal. 5) Output the sum of the elements above the diagonal 6) Output the odd numbers below the diagonal. 25 45 15 41 19 7) Output the even numbers above the diagonal. 30 32 50 42 12 311

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!