Advertisement
Oppaceted

main

May 12th, 2024
766
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. !
  2. program main
  3.     use Degree_row_module
  4.     implicit none
  5.     integer :: str, i
  6.     integer, allocatable :: n(:)
  7.     real(8), allocatable :: x(:), y(:), d(:)
  8.     real(8) :: low, high
  9.     real(8), parameter :: E = 1.0e-15
  10.     !
  11.     write (*,'(a$)') 'Enter number of strings: '
  12.     read (*,*) str
  13.     write (*,'(a$)') 'Enter low and high: '
  14.     read (*,*) low, high
  15.     !
  16.     allocate(n(str))
  17.     allocate(x(str))
  18.     allocate(y(str))
  19.     allocate(d(str))
  20.     !
  21.     n(:) = 0
  22.     d(:) = 0.0d0
  23.     y(:) = 0.0d0
  24.     do i =1,str
  25.         x(i) = low + ( ( (high-low)/(str-1) )*(i-1) )
  26.     end do
  27.     call ryad(str,x,n,y,d,E)
  28.     call output(str,x,n,y,d)
  29.     deallocate(n)
  30.     deallocate(x)
  31.     deallocate(y)
  32.     deallocate(d)
  33. end program main
  34.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement