Matriz Triangular
Matriz Triangular
Matriz Triangular
PROBLEMA 1
package javaapplication67;
x[n-1]= A[n-1][n]/A[n-1][n-1];
for(int i=n-2; i>=0; i--){
x[i]=A[i][n];
for(int j=i+1; j<=n-2; j++){
x[i]= x[i]-A[i][j]*x[j];
}
x[i]= x[i]/A[i][i];
}
return x;
}
void imprimir(double []x,int n){
for(int i=0; i<n; i++){
System.out.printf("x%d = ",i+1);
System.out.printf("%.2f\n",x[i]);
}
}
COMPILACION :