Find all factorial numbers less than or equal to n | PHP program to find all factorial numbers smaller than or equal to n . ; Compute next factorial using previous ; Driver code
< ? php function printFactorialNums ( $ n ) { $ fact = 1 ; $ x = 2 ; while ( $ fact <= $ n ) { echo $ fact , " " ; $ fact = $ fact * $ x ; $ x ++ ; } } $ n = 100 ; echo printFactorialNums ( $ n ) ; ? >