Find Nth term of the series 1 , 8 , 54 , 384. . . | calculate factorial of N ; calculate Nth term of series ; Driver Code
< ? php function fact ( $ N ) { $ product = 1 ; for ( $ i = 1 ; $ i <= $ N ; $ i ++ ) $ product = $ product * $ i ; return $ product ; } function nthTerm ( $ N ) { return ( $ N * $ N ) * fact ( $ N ) ; } $ N = 4 ; echo nthTerm ( $ N ) ; ? >