C factorial.f C factorial; x! C Program factorial: program fact C Variable declaration: integer factorial,x C Compute and print the result: write(*,*) 'Enter an integer:' read(*,*) x factorial = factfunc(x) write(*,*) x,'!=',factorial C End of program: end C Function factfunc: function factfunc(n) integer fact, n, p p = 1 do i = 1,n p = p*i end do factfunc = p end