I was attempting a problem on Project Euler - Problem 20.

Since 100! could not be stored as ulong, I was thinking of using hexadecimal. Though I find a lot of example of converting hexa to decomal and vice - versa, I cannot find any info on using it in calculations. I have the code for the problem ready, but the size of the number is huge.

Please help.

P.S. : I don't want the solution to the problem.

Recommended Answers

All 2 Replies

Yes hexadecimal may be the way to go, but consider bignumbers.
C# and .NET don't have them, F# does but perhaps that's another story.
Have a look on this site.
It is about the calculation of pi, but there is and implementation of Bignumbers here in C#.

commented: Good link. +9

Great, thanks a lot. That definitely helped. I'll have to first experiment with those before using them.

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.