5
First, I would like to inform you that I am new here on the site, and if by chance my question was left without information or badly organized please speak.
I was trying to solve that question:
I managed to develop this code:
import java.util.Scanner;
class Matriz1 {
public static void main(String[] args) {
Scanner ler = new Scanner(System.in);
int N = ler.nextInt();
int i, j, m[][] = new int[N][N];
// Ler matriz
for (i=0; i<N; i++) {
//informa linha
System.out.printf("Informe os elementos %da. linha:\n", (i+1));
for (j=0; j<N; j++) {
//informa qual numero deve se colocar
System.out.printf("m[%d][%d] = ", i, j);
m[i][j] = ler.nextInt();
}
// salta linha para n ficar confuso
System.out.printf("\n");
}
But I can not understand how I will take the differences of the diagonals of the matrix.
Thanks ,it worked out !
– Vinicius Clemente