Program s14cqfe
! S14CQF Example Program Text
! Mark 30.3 Release. nAG Copyright 2024.
! .. Use Statements ..
Use nag_library, Only: nag_wp, s14cqf
! .. Implicit None Statement ..
Implicit None
! .. Parameters ..
Integer, Parameter :: nin = 5, nout = 6
! .. Local Scalars ..
Integer :: i, ifail, n
! .. Local Arrays ..
Real (Kind=nag_wp), Allocatable :: a(:), b(:), w(:), w1(:), x(:)
Integer, Allocatable :: ivalid(:)
! .. Executable Statements ..
Write (nout,*) 'S14CQF Example Program Results'
! Skip heading in data file
Read (nin,*)
Write (nout,*)
Write (nout,*) &
' A B X W W1 IVALID'
Write (nout,*)
Read (nin,*) n
Allocate (a(n),b(n),x(n),w(n),w1(n),ivalid(n))
Read (nin,*)(a(i),b(i),x(i),i=1,n)
ifail = -1
Call s14cqf(n,a,b,x,w,w1,ivalid,ifail)
Do i = 1, n
Write (nout,99999) a(i), b(i), x(i), w(i), w1(i), ivalid(i)
End Do
99999 Format (1X,1P,5E12.3,I5)
End Program s14cqfe