FoRtRaN
Thursday, November 25, 2010
write a program to find the factorial of a given number (using do command)
implicit double precision (a-h,o-z)
iprod=1
write(*,*) 'n'
read(*,*) n
do i=1,n
iprod=iprod*i
enddo
write(*,*) iprod
stop
end
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment