program DETERMINANTE real,allocatable,dimension(:,:)::A integer::m,n integer::i,j print*," print*,"
UNIVERSIDAD NACIONAL MAYOR DE SAN MARCOS " CALCULO DE DETERMINANTES CUADRADAS M=N"
!INGRESANDO LAS ORDENES DE LA MATRIZ CUADRADA print*,"ingrese las ordenes de las matrices " read*, m,n allocate(A(m,n) ) !LLENANDO LA MATRIZ A print*,"ingrese datos a la matriz A" do i=1,m read*,(A(i,j),j=1,n) end do PRINT*,"MOSTRANDO LA MATRIZ A" DO i=1,m print*,(A(i,j),j=1,n) end do ! CALCULO DE DETERMINANTES det1=(A(1,1)*((A(2,2)*A(3,3))-(A(2,3)*A(3,2)))) det2=(A(1,2)*((A(2,1)*A(3,3))-(A(2,3)*A(3,1)))) det3=(A(1,3)*((A(2,1)*A(3,2))-(A(2,2)*A(3,1)))) DET=det1+det2+det3 print*,"la determinante es ",DET end program