you will need an arbitrary precision arithmetic library (or implement one yourself... I think there are some
snippets to this end here on DIC.
Other than that you can find the classic factorial algorithms just about anywhere (even in the snippets section here).
Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.
Please post like this:

Thank you for helping us helping you.
This post has been edited by NickDMax: 9 Aug, 2008 - 08:18 AM