program ex0704
implicit none
integer :: n, ans
interface
subroutine fact(n, ans)
implicit none
integer, intent(in) :: n
integer, intent(inout) :: ans
end subroutine fact
end interface
write(*,*) 'Input N:’
read(*,*) n
call fact(n, ans)
write(*, '(t2, i2, a3, i10)’) n, '!=' ,ans
stop
end program ex0704