write the FORTRAN program to find the factorial of given number
Answers
Answered by
1
implicit double precision (a-h,o-z)
iprod=1
i=1
write(*,*) 'n'
read(*,*) n
10 if(i.LE.n) then
iprod=iprod*i
i=i+1
goto 10
else
write(*,*) iprod
goto 20
20 endif
stop
end
iprod=1
i=1
write(*,*) 'n'
read(*,*) n
10 if(i.LE.n) then
iprod=iprod*i
i=i+1
goto 10
else
write(*,*) iprod
goto 20
20 endif
stop
end
Similar questions