a) Define a matrix A which should be dynamically allocatable. Then
allocate the matrix with sizes read in from the user input and fill the matrix
with random numbers using the array intrinsic function random_number
.
b) Then use suitable array intrinsic functions to print out the following details:
- What is the sum of elements across the 2nd dimension of A?
- Find the location coordinates of the maximum elements of A.
- What is the absolute minimum value of the array A?
- Are all elements of A greater than or equal to zero?
- How many elements of A are greater than or equal to 0.5?
There is a skeleton code being provided in array.F90.