youll need an outer loop which loops as high as the amount of factorials you want to compute, and an inner loop which will compute the factorial at the outer loops number.
pseudocode:
input n
set x = 1
loop n times
set num = 1
set y = 0
loop from x to 1
multiply num by y and re-store it into num
end loop
print num
end loop
that should do the job....unless i overlooked something
TylerSBreton
Junior Poster in Training
89 posts since Oct 2006
Reputation Points: 25
Solved Threads: 3
Nice program! I ran it and for factorial 13 I got 1932053504 when it should be 6227020800.
sneekula
Nearly a Posting Maven
2,427 posts since Oct 2006
Reputation Points: 961
Solved Threads: 212
For really large number you need to consider using strings.
Perhaps even karbutstra's algo, for efficient multiplication.
iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439
And if you can manage it I think there is a possibility to integrate java's big number class with vb.net or so I've read.
iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439