Question: Write a Java program that generates a two-dimensional array of size 5x5. Then it should fill the array with 25 random integer numbers (numbers range:

Write a Java program that generates a two-dimensional array of size 5x5. Then it should fill the

array with 25 random integer numbers (numbers range: between 241 and 524 inclusive). The

program should display the array elements, then it should convert any odd numbers in the array

to an even number by adding one to any odd number and display the array elements after the

conversion.

Output sample

The array elements are:

69 25 7 67 10

15 34 86 78 44

65 77 82 66 97

46 68 79 59 52

87 13 61 30 48

The array elements after converting any odd number to even number:

70 26 8 68 10

16 34 86 78 44

66 78 82 66 98

46 68 80 60 52

88 14 62 30 48

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!