Quote:I develop a C# program to compute N! using integer type, but i need to convert it to unsigned integer type of array to store a N from 1 to 99,999,999. The function will compute N! and store into array with a maximum 4 digits per element.

No, you can't.

Even as an unsigned integer occupying the full 32 bits (4 bytes) you cannot fit

`9,999,999!`

into it. The maximum value you can fit into 32 bit (even unsigned) is `4,294,967,295`

, and 13! exceeds that: 6,227,020,800.Even if you move to a 64 bit integer, you cannot fit even close to 99,999,999!: the larges an unsigned 64 bit integer can hold is

`9,223,372,036,854,775,807`

so 20! is the largest you can fit: `2,432,902,008,176,640,000`

Bear in mind that factorial values grow an an exponential rate: it is unlikely that all the memory in all the computers on Earth would have enough memory to hold 99,999,999! at all.

Why would there be an array?

The very mention of "maximum 4 digits per element" and "if the digits in an element of the array ... contains leading zeros" is nonsense -- unless you are storing the results as strings?