Files
seer/tests/hellodprintf/fortran_function.f

18 lines
362 B
FortranFixed
Raw Permalink Normal View History

2024-05-04 10:46:39 -05:00
subroutine FORTRANFUNCTION(count)
implicit none
integer :: count
integer :: nfact = 1
integer :: n
! compute factorials
print*, "Fortran loop"
do n = 1, count
nfact = nfact * n
! printing the value of n and its factorial
print*, n, " ", nfact
end do
return
end