i have this assignment to compute the factorial of an integer of any length. I have done it using array of char and then overloading the * operator accordingly. It works fine but i wanted to know if there were other efficient algorithms for counting factorials of any length. Give me some links if u find some. My search in google did not return anything exciting. If urs does then plz give me the links.
Asif_NSU 25 Posting Whiz
Recommended Answers
Jump to PostCan u please, post ur solution
If u can`t post the soln. then can u please explain how to find the factorial of a number of any length.
Jump to Posthow to define a class which can "hold an integer of any length". my problem is that i am unable to define an integer of any length".
Jump to PostThat's the problem when you pull code from some website or book and submit it as your own... You learn nothing from it.
Learn to make your own code, learn to understand the code of others.Copy Paste Find Replace! Hahah stay away from that philosphy and you will do …
Jump to Postby the way, to pretty up your code, enclose it with at least 4 space indention.
More specifically, the block look like this:
code goes here
Jump to Posti was able to write the code for a factorial of upto 8000, but after that it`s not working b`cos the array i`m using to store the factorial can`t have more than 30000 elments. is there any other way to store more number of digits.
It the array currently statically …
All 18 Replies
Asif_NSU 25 Posting Whiz
varunrathi 0 Light Poster
jwenting 1,905 duckman Team Colleague
Asif_NSU 25 Posting Whiz
Asif_NSU 25 Posting Whiz
vegaseat 1,735 DaniWeb's Hypocrite Team Colleague
varunrathi 0 Light Poster
1o0oBhP 4 Posting Pro in Training
BountyX 7 Posting Whiz in Training
vegaseat 1,735 DaniWeb's Hypocrite Team Colleague
1o0oBhP 4 Posting Pro in Training
vegaseat 1,735 DaniWeb's Hypocrite Team Colleague
alc6379 120 Cookie... That's it Team Colleague
Asif_NSU 25 Posting Whiz
1o0oBhP 4 Posting Pro in Training
varunrathi 0 Light Poster
Dave Sinkula 2,398 long time no c Team Colleague
roxanne_gem07 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.