Files
seer/tests/hellodprintf/fortran_function.f
2024-12-20 10:17:07 -06:00

18 lines
362 B
FortranFixed

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