*     S21CCF Example Program Text
*     Mark 20 Release. NAG Copyright 2001.
*     .. Parameters ..
      INTEGER          NIN, NOUT
      PARAMETER        (NIN=5,NOUT=6)
*     .. Local Scalars ..
      DOUBLE PRECISION Q, X, Y
      INTEGER          IFAIL, K
*     .. External Functions ..
      DOUBLE PRECISION S21CCF
      EXTERNAL         S21CCF
*     .. Executable Statements ..
      WRITE (NOUT,*) 'S21CCF Example Program Results'
*     Skip heading in data file
      READ (NIN,*)
      WRITE (NOUT,*)
      WRITE (NOUT,*) ' K    X     Q         Y        IFAIL'
      WRITE (NOUT,*)
   20 READ (NIN,*,END=40) K, X, Q
      IFAIL = 0
*
      Y = S21CCF(K,X,Q,IFAIL)
*
      WRITE (NOUT,99999) K, X, Q, Y, IFAIL
      GO TO 20
   40 STOP
*
99999 FORMAT (1X,I2,2X,F4.1,2X,F4.1,2X,1P,E12.4,I6)
      END
