Where is the error?!

06-28-2007, 10:08 AM
Good morning,
I m a beginner on the fortran,
I write a program to calculate the sum from i=1 to n of 1/i!
and i have one error, but i don t know how to delete these error, could you help me?
thank you
this is my program :

program expo
implicit none
integer n,j
real sum
print* ,'entrer le nombre n:'
do j=1,n
end do

function fact(m)
integer fact, m, p
p = 1
do i = 1, m
p = p * i
end do
fact = p
end function fact

07-08-2007, 06:53 PM
Hi, can you post the error message you are receiving?

07-10-2007, 07:22 AM
Feynman, your code works fine for me. But it if you use incorrect n in
you can get math error
good luck

Janet Kellman, software reviews (http://rbytes.net/software/)