Find all factorial numbers less than or equal to n | C # program to find all factorial numbers smaller than or equal to n . ; Compute next factorial using previous ; Driver code
using System ; class GFG { static void printFactorialNums ( int n ) { int fact = 1 ; int x = 2 ; while ( fact <= n ) { Console . Write ( fact + " ▁ " ) ; fact = fact * x ; x ++ ; } } public static void Main ( ) { int n = 100 ; printFactorialNums ( n ) ; } }