      SUBROUTINE DLLTK(N,A,LDA,INFO)
      implicit none
*
*     Computes an L*L**T factorization of a symmetric positive-definite
*     matrix A.
*     Unblocked algorithm, K variant.
*
*     .. Parameters ..
      REAL*8           ONE, ZERO
      PARAMETER        (ONE=1.0E+0,ZERO=0.0E+0)
*     .. Scalar Arguments ..
      INTEGER          INFO, LDA, N
*     .. Array Arguments ..
      REAL*8           A(LDA,*)
*     .. Local Scalars ..
      INTEGER          K
*     .. External Subroutines ..
      EXTERNAL         SSCAL, SSYR
*     .. Intrinsic Functions ..
      INTRINSIC        SQRT
*     .. Executable Statements ..
      INFO = 0
      DO 20 K = 1, N
         IF (A(K,K).LE.ZERO)
     $      GO TO 40
         A(K,K) = SQRT(A(K,K))
         IF (K.LT.N) THEN
            CALL DSCAL(N-K,ONE/A(K,K),A(K+1,K),1)
            CALL DSYR('Lower',N-K,-ONE,A(K+1,K),1,A(K+1,K+1),LDA)
         END IF
   20 CONTINUE
      RETURN
   40 CONTINUE
      INFO = K
      RETURN
      END
