Professional Documents
Culture Documents
println(": "+dz);
ob1.a3();
System.out.println("");
ob1.arr(array);
dx=ob1.hdx(mat, array);
dy=ob1.hdy(mat, array);
dz=ob1.hdz(mat, array);
Compilación
run:
Ingrese coef.variable X
Ingrese coef.variable Y
Ingrese coef.variable Z
Ingrese coef.variable Y
Ingrese coef.variable Z
Ingrese coef.variable Z
5X + 6Y + 4Z = 1
1Y + 9Z = 6
5Z = 8
: 25
Determinante de la variable'x' :
: 225
Determinante de la variable'y' :
: -210
Determinante de la variable'z' :
: 40
Valor de x: 9.0
Valor de y: -8.4
Valor de z: 1.6
BUILD SUCCESSFUL (total time: 11 seconds)
Problema 4
package javaapplication5;
import java.util.Scanner;
for(int i=0;i<4;i++){
array[i]=sc.nextLine();
for(int i=0;i<4;i++){
arrnot1[i]=sc.nextLine();
matriz[0][0]=array[0];
matriz[1][0]=array[1];
matriz[2][0]=array[2];
matriz[3][0]=array[3];
matriz[0][1]=" 10.2 ";//Conversion de Decimal a String
for(int i=0;i<4;i++){
for(int j=0;j<2;j++){
System.out.print(" "+matriz[i][j]);
}System.out.println("");
System.out.print(matriz[3][0]+" : "+matriz[3][1]);
System.out.println("");
System.out.print(matriz[2][0]+" : "+matriz[2][1]);
System.out.println("");
System.out.print(matriz[1][0]+" : "+matriz[1][1]);
System.out.println("");
System.out.print(matriz[0][0]+" : "+matriz[0][1]);
System.out.println("");
package javaapplication5;
public class Principal4 {
ob1.nombres(array);
ob1.mostrar1(matriz);
ob1.ordenar(matriz);
Compilación
run:
jairo
luis
abel
juan
jairo 10.2
luis 11.4
abel 12.8
juan 14.6
juan : 14.6
abel : 12.8
luis : 11.4
jairo : 10.2