Matrix with Element Search Inside

Exercise on matrices for applied science students

Exercise on matrices for applied science students. /*Realize an initialized matrix with numbers from 1 to 90, create the following methods: 1) count how many numbers n there are (N given as a parameter), 2) indicate the indices of the number n if present in the matrix (n given as input), 3) create a method that calculates the sum of elements from n1 to n2 given as input, 4) sum the elements of the main diagonal. */ package eserciziomatrici; public class EsercizioMatrici { public static void main(String[] args) { int m[][]= new int[10][10]; m=inizializzaMatrice(m); stampaMatrice(m); int NContato=0; int n=10; NContato=ContaNMatrice(m,n); System.out.println(); System.out.println(); System.out.println("in the matrix there are " + NContato + " times " + n); // modify this code and find all occurrences of numbers from 1 to 90
}
public static int[][] inizializzaMatrice(int a[][]) { for(int i=0;i} return conteggio; } }