Program x04ccfe ! X04CCF Example Program Text ! Mark 24 Release. NAG Copyright 2012. ! .. Use Statements .. Use nag_library, Only: nag_wp, x04ccf ! .. Implicit None Statement .. Implicit None ! .. Parameters .. Integer, Parameter :: nmax = 5, nout = 6 Integer, Parameter :: la = (nmax*(nmax+1))/2 ! .. Local Scalars .. Integer :: i, ifail ! .. Local Arrays .. Real (Kind=nag_wp) :: a(la) ! .. Intrinsic Procedures .. Intrinsic :: real ! .. Executable Statements .. Write (nout,*) 'X04CCF Example Program Results' Write (nout,*) Flush (nout) ! Generate an array of data Do i = 1, la a(i) = real(i,kind=nag_wp) End Do ! Print order (nmax-1) lower triangular matrix ifail = 0 Call x04ccf('Lower','Unit',nmax-1,a,'Example 1:',ifail) Write (nout,*) Flush (nout) ! Print order nmax upper triangular matrix ifail = 0 Call x04ccf('Upper','Non-unit',nmax,a,'Example 2:',ifail) End Program x04ccfe