
       implicit integer*4(i-n)
       implicit real*8(a-h,o-z)
       parameter(nmax=1000)
       dimension x(nmax)
       dimension cx(nmax,nmax)
      
       write(6,'(a,$)')'nx: '
       read(5,*)nx
       write(6,'(a,$)')'nfunc: '
       read(5,*)nf
       write(6,'(a,$)')'hx0: '
       read(5,*)hx
       write(6,'(a,$)')'hxF: '
       read(5,*)hy
c       nx=4
c       ny=10
c       hx=15.d+00
c       hy=30.d+00
      
      do i=1,nx+1
        x(i)=dfloat(i-1)/dfloat(nx)
        x(i)=hx+x(i)*(hy-hx)
      enddo
      
      do j=1,nf
        do i=1,nx+1
          cx(i,j)=dfloat(j)*sin(x(i))
        enddo
      enddo
      
      open(unit=10,file='datos2.txt',status='unknown')

      write(10,'(2i5)')nx,nf
      write(10,*)
      
      do i=1,nx+1
        write(10,101)x(i)
      enddo
      write(10,*)
      do j=1,nf
        do i=1,nx+1
        write(10,101)cx(i,j)
        enddo
        write(10,*)
      enddo

 101   format(e15.6)
      close(10)
      


      end
      

       