o Generate this Two-Dimensional Array o A 11 16 21 26 31 12 17 22 27 32 13 18 23 28 33 14 19 24 29 34 15 20 25 30 35 • Perform the following operations o Display Array A. o Calculate the sum of the elements in the 3rd row o Find the largest value in the first column o Create a One-Dimensional Array B to become the sum of each column from Array A. o Add each element of rows 2 and 3 to replace row 3. Such as A(3,1)=A(3,1) +A(2,1) o Interchange columns 3 and 4 o Compute the sum of the entries of the main diagonal. A(1,1), A(2,2) A(3,3),A(4,4),A(5,5) o Compute the sum of the secondary diagonal and determine the largest entry in that diagonal. A(1,5),A(2,4),A(3,3),A(4,2),A(5,1) o Print the smallest element of Array A and its position in the array(ro
CSCI 1302 Computer Science II
Program 8
Requirements
o Generate this Two-Dimensional Array
o A
11 16 21 26 31
12 17 22 27 32
13 18 23 28 33
14 19 24 29 34
15 20 25 30 35
• Perform the following operations
o Display Array A.
o Calculate the sum of the elements in the 3rd row
o Find the largest value in the first column
o Create a One-Dimensional Array B to become
the sum of each column from Array A.
o Add each element of rows 2 and 3 to replace
row 3. Such as A(3,1)=A(3,1) +A(2,1)
o Interchange columns 3 and 4
o Compute the sum of the entries of the main
diagonal.
A(1,1), A(2,2) A(3,3),A(4,4),A(5,5)
o Compute the sum of the secondary diagonal and
determine the largest entry in that diagonal.
A(1,5),A(2,4),A(3,3),A(4,2),A(5,1)
o Print the smallest element of Array A and its
position in the array(row,column).
JAVA
Trending now
This is a popular solution!
Step by step
Solved in 2 steps