program main implicit none integer :: n =10 interface function fib(n) integer, intent(in) :: n integer :: fib end function fib end interface ! Open parallel region and pay attention to how many threads should call the following instruction print *, fib(n) end program main recursive function fib (n) result (fnum) integer, intent(in) :: n integer :: i,j integer :: fnum if (n<2) then fnum = n else ! use task construct here, decide what is shared or firstprivate i= fib(n-1) ! use task construct here, decide what is shared or firstprivate j= fib(n-2) ! use task construct here, is sincronization necessary? fnum = i+j endif end function fib