mirror of
https://github.com/epasveer/seer.git
synced 2026-08-29 16:40:42 +08:00
18 lines
362 B
FortranFixed
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
|