Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
import java.io.BufferedReader;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.charset.Charset;
import java.nio.file.Files;
}else {
for (int i =0; i < k.length; i++) {
arr[count][i]= Integer.parseInt(k[i]);
}
count++;
}
}
}catch (Exception e) {
System.out.println(e.getMessage());
//return false;
}
for(int i =0; i < arr.length; i++) {
for (int j =0; j < arr.length; j++) {
System.out.print(arr[i][j]+" ");
}
System.out.println();
}
//return true;
return arr;
}
double A[][] =
loadData("D:\\Nam4\\Nam4\\Java\\workspace\\chanh\\nhap.txt");
// double B[][] =
Chanh.loadData("D:\\Nam4\\Nam4\\Java\\workspace\\chanh\\B.txt");
// Chanh I = new Chanh();
// System.out.println(count);
System.out.println("Dinh thuc ma tran A : "+determinant(A,count));
count = 0;
double B[][] =
loadData("D:\\Nam4\\Nam4\\Java\\workspace\\chanh\\B.txt");
C[i][j] = 0;
for (int k = 0; k < count; k++) {
C[i][j] = (int) (C[i][j] + A[i][k] * B[k][j]);
}
}
}
System.out.println("Ma tr?n t�ch C: ");
for (int i = 0; i < count; i++) {
for (int j = 0; j < count; j++) {
System.out.print(C[i][j] + "\t");
}
System.out.println("\n");
}