Question: Problem 1) Find number of non-zero element in a matrix (two-dimensional array)- use as an example: 10 -4 0 Read the values from input and

 Problem 1) Find number of non-zero element in a matrix (two-dimensional

Problem 1) Find number of non-zero element in a matrix (two-dimensional array)- use as an example: 10 -4 0 Read the values from input and test your code with different matrices and sizes. Problem 2) Extract diagonal elements of a square matrix and put into a column array. As an example, you can read the matrix below from input: 1 -9 10 21 60 22 8 5 7 And your output display should look like: 60 7 Test your code with other size square matrices and random numbers

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!