Quote:
Originally Posted by MiniGeek
Here's an example in Java that uses BigInteger, an arbitraryprecision integer, and prints every factorial up to the size you specify:

Maybe the answer the O.P. was looking for is rather something like
Code:
int factorial(int n){ int f=1; while( n>1 ) f *= n; return(f); }
main(){ int n; for( n=1; n<10; n++ ) printf( "%d ! = %d\n", n, factorial(n)); }
Of course I know that I could have used "unsigned long long" or mpz instead of "int" in factorial, but w.r.t. n1=1; n2=2; ... it should be just perfect as is.