SUBROUTINE ADMAT (A,M,N,URMA)
URMA=0.
DO 10 I=1,M
DO 10 I=1,M
10 URMA)=URMA+A(I,I)
RETURN
END
SUBROUTINE CPYDIA (A,M,N,X)
DO 10 I=1,M
10 X(I)=A(I,I)
RETURN
END
SUBROUTINE SUMSIR (X,N,SUMA)
SUMA=0.
SUMA=0.
DO 10 I=1,M
10 SUMA=SUMA+X(I)
RETURN
END
SUBROUTINE URMAT (A,M,N,URMA)
DIMENSION X(1)
CALL CPYDIA (A,M,N,X)
CALL SUMSIR (X,N,SUMA)
DIMENSION X(1)
CALL CPYDIA (A,M,N,X)
CALL SUMSIR (X,N,SUMA)
URMA=SUMA
RETURN
END
(26 decembrie 2017)
No comments:
Post a Comment