! This is a basic starting shell for your programs MODULE const INTEGER, PARAMETER :: dp = KIND(1.0d0), sp = KIND(1.0e0) REAL(KIND=dp), PARAMETER :: dpi = 3.141592653589793d0 END MODULE const ! PROGRAM prog USE const IMPLICIT NONE ! ! Program for computing factorials ! INTEGER :: total,n,i WRITE(*,*) 'Input n' READ(*,*) n total = 1 DO i = 1,n total = total*i ENDDO WRITE(*,*) 'n! = ',total END PROGRAM prog !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! Input n ! 0 ! n! = 1 ! ! Input n ! 7 ! n! = 5040 ! ! Input n ! 11 ! n! = 39916800 ! ! Input n ! 15 ! n! = 2004310016 <--- Not right!!